Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUILD] Avoid dependency on protobuf from the OTLP HTTP metrics exporter header #2179

Merged
merged 2 commits into from
Jun 6, 2023

Conversation

marcalff
Copy link
Member

@marcalff marcalff commented Jun 5, 2023

Fixes #2169

Changes

Simplify the header dependencies for file:

  • exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_metric_exporter.h

The declaration of class OtlpHttpMetricExporter does not need to see code in otlp_metric_utils.h, only the implementation does.

Depending on otlp_metric_utils.h from a header file is problematic, because it brings a transitive dependency on protobuf generated code, which is not installed.

This fix allows an application to instantiate a OtlpHttpMetricExporter object, to configure the SDK to export metrics.

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

@marcalff marcalff requested a review from a team June 5, 2023 21:03
@codecov
Copy link

codecov bot commented Jun 5, 2023

Codecov Report

Merging #2179 (b7ca040) into main (500cf98) will decrease coverage by 0.02%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2179      +/-   ##
==========================================
- Coverage   87.52%   87.50%   -0.02%     
==========================================
  Files         169      169              
  Lines        4887     4887              
==========================================
- Hits         4277     4276       -1     
- Misses        610      611       +1     

see 1 file with indirect coverage changes

@marcalff marcalff merged commit 600bd30 into open-telemetry:main Jun 6, 2023
@marcalff marcalff deleted the fix_protobuf_include_2169 branch September 5, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUILD] Build break when using OTLP HTTP Metrics exporter
2 participants