-
Notifications
You must be signed in to change notification settings - Fork 902
Description
Describe the bug
Both OtlpSpanExporterProvider
and OtlpLogRecordExporterProvider
implement AutoConfigureListener
which they use to manage a MeterProvider
supplier passed to the exporters that they create. OtlpMetricExporterProvider
does not do that thus always relying on the default value of io.opentelemetry.exporter.internal.http.HttpExporterBuilder#meterProviderSupplier
which is GlobalOpenTelemetry::getMeterProvider
.
This creates a problem when I am trying to create an instance of OpenTelemetrySdk without setting it as a global one (exactly as GlobalOpenTelemetry
class-level javadoc "strongly" recommends). In this situation there is no global OpenTelemetry instance and there is no way for me to pass any other MeterProvider
to my metrics exporter.
What did you expect to see?
Make OtlpMetricExporterProvider
implement AutoConfigureListener
in exactly the same was as OtlpSpanExporterProvider
and call builder.setMeterProvider(meterProviderRef::get)
when configuring metrics exporter builder.
What version and what artifacts are you using?
opentelemetry-exporter-otlp-1.50.0.jar