Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,19 @@ jobs:
# ./ci/do_ci.sh cmake.exporter.otprotocol.test

cmake_test:
name: CMake test (without otlp-exporter)
runs-on: ubuntu-latest
name: CMake test (prometheus, elasticsearch, zipkin)
runs-on: ubuntu-22.04
env:
CXX_STANDARD: '17'
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: setup
env:
CC: /usr/bin/gcc-12
CXX: /usr/bin/g++-12
run: |
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run cmake tests (without otlp-exporter)
env:
CC: /usr/bin/gcc-12
CXX: /usr/bin/g++-12
- name: run cmake tests
run: |
./ci/do_ci.sh cmake.test

Expand Down
14 changes: 12 additions & 2 deletions exporters/elasticsearch/src/es_log_recordable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,27 @@

namespace nlohmann
{
template <class T>
template <typename T>
struct json_assign_visitor
{
T *j_;
json_assign_visitor(T &j) : j_(&j) {}

template <class U>
template <typename U>
void operator()(const U &u)
{
*j_ = u;
}

template <typename U>
void operator()(const opentelemetry::nostd::span<U> &span)
{
*j_ = nlohmann::json::array();
for (const auto &elem : span)
{
j_->push_back(elem);
}
}
};

template <>
Expand Down
Loading