open-telemetry / opentelemetry-cpp

The OpenTelemetry C++ Client
https://opentelemetry.io/
Apache License 2.0
889 stars 425 forks source link

[TEST] add a test for ElasticSearchRecordable #3154

Open sjinks opened 2 days ago

sjinks commented 2 days ago

Changes

This PR adds a test for opentelemetry::exporter::logs::ElasticSearchRecordable and updates the (disabled) tests for Elasticsearch Logs Exporter to ensure they compile.

The plan is to refactor the ES Recordable to use the ADL Serializer. This will make the code much more readable and maintainable (no need to use nostd::holds_alternative or value.index() + nostd::get() and keep the list of the types up-to-date). That is why we need a test to make sure that the refactoring will not break the things.

For significant contributions please make sure you have completed the following items:

netlify[bot] commented 2 days ago

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
Latest commit b006b8d1e10a74ac36a74b0faf8b47a19c0d6085
Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/673d3e007a6e020008624ad4
codecov[bot] commented 2 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.84%. Comparing base (4d9cc28) to head (b006b8d).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3154/graphs/tree.svg?width=650&height=150&src=pr&token=FJESTYQ2AD&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3154?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #3154 +/- ## ========================================== - Coverage 87.86% 87.84% -0.01% ========================================== Files 195 195 Lines 6151 6151 ========================================== - Hits 5404 5403 -1 - Misses 747 748 +1 ``` [see 1 file with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3154/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)

🚨 Try these New Features:

sjinks commented 2 days ago

Bazel on MacOS and IWYU failed for unrelated to this PR reasons; I cannot restart these jobs.

marcalff commented 2 days ago

Waiting a bit for possible comments, then will merge.