open-telemetry / opentelemetry-cpp

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

[Code health] Include what you use cleanup, part 5 #3140

Open marcalff opened 1 week ago

marcalff commented 1 week ago

Contributes to #2054

Changes

Please provide a brief description of the changes here.

Note that the cleanup is not completed, as some optional parts (OTLP GRPC) are not covered yet by the build in CI. This will be handled in subsequent PRs.

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

netlify[bot] commented 1 week ago

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

Name Link
Latest commit 4bfb381a153c29cb6f3e2fae4ca1370afb100a58
Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/6744d9c58db5dd0008ce5760
codecov[bot] commented 1 week ago

Codecov Report

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

Project coverage is 87.86%. Comparing base (2a8c8bc) to head (4bfb381).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140/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/3140?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 #3140 +/- ## ======================================= Coverage 87.86% 87.86% ======================================= Files 195 195 Lines 6151 6151 ======================================= Hits 5404 5404 Misses 747 747 ``` | [Files with missing lines](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [api/include/opentelemetry/nostd/variant.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?src=pr&el=tree&filepath=api%2Finclude%2Fopentelemetry%2Fnostd%2Fvariant.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YXBpL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS9ub3N0ZC92YXJpYW50Lmg=) | `66.67% <ø> (ø)` | | | [...telemetry/exporters/memory/in\_memory\_metric\_data.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?src=pr&el=tree&filepath=exporters%2Fmemory%2Finclude%2Fopentelemetry%2Fexporters%2Fmemory%2Fin_memory_metric_data.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZXhwb3J0ZXJzL21lbW9yeS9pbmNsdWRlL29wZW50ZWxlbWV0cnkvZXhwb3J0ZXJzL21lbW9yeS9pbl9tZW1vcnlfbWV0cmljX2RhdGEuaA==) | `100.00% <ø> (ø)` | | | [exporters/memory/src/in\_memory\_metric\_data.cc](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?src=pr&el=tree&filepath=exporters%2Fmemory%2Fsrc%2Fin_memory_metric_data.cc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZXhwb3J0ZXJzL21lbW9yeS9zcmMvaW5fbWVtb3J5X21ldHJpY19kYXRhLmNj) | `85.00% <ø> (ø)` | | | [...rs/memory/src/in\_memory\_metric\_exporter\_factory.cc](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?src=pr&el=tree&filepath=exporters%2Fmemory%2Fsrc%2Fin_memory_metric_exporter_factory.cc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZXhwb3J0ZXJzL21lbW9yeS9zcmMvaW5fbWVtb3J5X21ldHJpY19leHBvcnRlcl9mYWN0b3J5LmNj) | `100.00% <ø> (ø)` | | | [...xporters/memory/test/in\_memory\_metric\_data\_test.cc](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?src=pr&el=tree&filepath=exporters%2Fmemory%2Ftest%2Fin_memory_metric_data_test.cc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZXhwb3J0ZXJzL21lbW9yeS90ZXN0L2luX21lbW9yeV9tZXRyaWNfZGF0YV90ZXN0LmNj) | `100.00% <ø> (ø)` | | | [...ters/memory/test/in\_memory\_metric\_exporter\_test.cc](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?src=pr&el=tree&filepath=exporters%2Fmemory%2Ftest%2Fin_memory_metric_exporter_test.cc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZXhwb3J0ZXJzL21lbW9yeS90ZXN0L2luX21lbW9yeV9tZXRyaWNfZXhwb3J0ZXJfdGVzdC5jYw==) | `100.00% <ø> (ø)` | | | [exporters/memory/test/in\_memory\_span\_data\_test.cc](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?src=pr&el=tree&filepath=exporters%2Fmemory%2Ftest%2Fin_memory_span_data_test.cc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZXhwb3J0ZXJzL21lbW9yeS90ZXN0L2luX21lbW9yeV9zcGFuX2RhdGFfdGVzdC5jYw==) | `100.00% <ø> (ø)` | | | [...orters/memory/test/in\_memory\_span\_exporter\_test.cc](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?src=pr&el=tree&filepath=exporters%2Fmemory%2Ftest%2Fin_memory_span_exporter_test.cc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZXhwb3J0ZXJzL21lbW9yeS90ZXN0L2luX21lbW9yeV9zcGFuX2V4cG9ydGVyX3Rlc3QuY2M=) | `100.00% <ø> (ø)` | | | [exporters/ostream/test/ostream\_log\_test.cc](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?src=pr&el=tree&filepath=exporters%2Fostream%2Ftest%2Fostream_log_test.cc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZXhwb3J0ZXJzL29zdHJlYW0vdGVzdC9vc3RyZWFtX2xvZ190ZXN0LmNj) | `96.18% <ø> (ø)` | | | [exporters/ostream/test/ostream\_metric\_test.cc](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?src=pr&el=tree&filepath=exporters%2Fostream%2Ftest%2Fostream_metric_test.cc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZXhwb3J0ZXJzL29zdHJlYW0vdGVzdC9vc3RyZWFtX21ldHJpY190ZXN0LmNj) | `100.00% <ø> (ø)` | | | ... and [2 more](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3140?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | |
marcalff commented 1 week ago

@open-telemetry/cpp-contrib-approvers Ready for review.

marcalff commented 9 hours ago

@ThomsonTan @lalitb @esigo @owent

Any chance to approve this cleanup, so it goes into release 1.18.0 ?