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.
In an application, include file
opentelemetry/exporters/otlp/otlp_http_metric_exporter.h,to see class
OtlpHttpMetricExporterFile
opentelemetry/exporters/otlp/otlp_metric_utils.his 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 ofOtlpHttpMetricExporter, 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.hshould not need to see protobuf generated code, this is an implementation dependency.