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] Build break when using OTLP HTTP Metrics exporter #2169

Closed
marcalff opened this issue Jun 1, 2023 · 0 comments · Fixed by #2179
Closed

[BUILD] Build break when using OTLP HTTP Metrics exporter #2169

marcalff opened this issue Jun 1, 2023 · 0 comments · Fixed by #2179
Assignees
Labels
bug Something isn't working

Comments

@marcalff
Copy link
Member

marcalff commented Jun 1, 2023

In an application, include file
opentelemetry/exporters/otlp/otlp_http_metric_exporter.h,
to see class OtlpHttpMetricExporter

File opentelemetry/exporters/otlp/otlp_metric_utils.h is included in the build.

The build fails:

fatal error: 'opentelemetry/proto/collector/metrics/v1/metrics_service.pb.h' file not found

because protobuf generated files are not installed with opentelemetry headers.

There are two issues here.

opentelemetry-cpp should expose Factory::Create() methods to build instances of OtlpHttpMetricExporter, per issue #1485, so that users don't need to see OtlpHttpMetricExporter directly.

Because the factory is not available, the work around is to instantiate OtlpHttpMetricExporter instead, which leads to:

The class definition in otlp_http_metric_exporter.h should not need to see protobuf generated code, this is an implementation dependency.

@marcalff marcalff added the bug Something isn't working label Jun 1, 2023
@marcalff marcalff self-assigned this Jun 1, 2023
marcalff added a commit to marcalff/opentelemetry-cpp that referenced this issue Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant