Skip to content

Conversation

@marcalff
Copy link
Member

@marcalff marcalff commented Jun 3, 2024

Contributes to #2054

Changes

Performed general cleanup to resolve issues reported by include-what-you-use:

  • Cleanup in SDK for common
  • Cleanup in SDK for traces
  • Cleanup in SDK for metrics
  • Cleanup in SDK for logs
  • Cleanup in the ostream exporter
  • Cleanup in the memory exporter
  • Cleanup in examples

For the most part, applying the code suggestions from include-what-you-use was sufficient.

In some cases, in particular for:

namespace nostd = opentelemetry::nostd;

nostd::xxx foo;

the namespace directive causes iwyu to want a header to declare the nostd namespace itself.

Because there are many available headers, iwyu does not suggest the best choice.

Resolved by removing the namespace alias, and use fully qualified names instead:

opentelemetry::nostd::xxx foo;

Note that further cleanup is required, for code build optionally (various exporters, unit tests, etc).

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

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@codecov
Copy link

codecov bot commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 70.96774% with 9 lines in your changes missing coverage. Please review.

Project coverage is 87.67%. Comparing base (497eaf4) to head (64e0b07).
Report is 81 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2692      +/-   ##
==========================================
+ Coverage   87.12%   87.67%   +0.55%     
==========================================
  Files         200      190      -10     
  Lines        6109     5853     -256     
==========================================
- Hits         5322     5131     -191     
+ Misses        787      722      -65     
Files Coverage Δ
api/include/opentelemetry/nostd/utility.h 83.34% <ø> (ø)
...de/opentelemetry/plugin/detail/dynamic_load_unix.h 24.00% <ø> (ø)
api/include/opentelemetry/plugin/factory.h 0.00% <ø> (ø)
...de/opentelemetry/exporters/ostream/span_exporter.h 100.00% <ø> (ø)
exporters/ostream/src/log_record_exporter.cc 97.06% <ø> (-0.08%) ⬇️
...porters/ostream/src/log_record_exporter_factory.cc 100.00% <ø> (ø)
exporters/ostream/src/metric_exporter.cc 90.91% <ø> (-0.89%) ⬇️
exporters/ostream/src/span_exporter.cc 87.50% <ø> (-0.61%) ⬇️
...pentelemetry/sdk/logs/batch_log_record_processor.h 100.00% <ø> (ø)
...ry/sdk/metrics/aggregation/histogram_aggregation.h 90.48% <ø> (-0.82%) ⬇️
... and 36 more

... and 76 files with indirect coverage changes

@marcalff marcalff marked this pull request as ready for review June 7, 2024 19:23
@marcalff marcalff requested a review from a team June 7, 2024 19:23
@marcalff marcalff added the pr:please-review This PR is ready for review label Jun 7, 2024
Copy link
Member

@owent owent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great job.

@marcalff marcalff merged commit f97dc06 into open-telemetry:main Jun 15, 2024
@marcalff marcalff deleted the fix_iwyu_cleanup branch February 5, 2025 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:please-review This PR is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants