-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
status: noteworthyA noteworthy issue to call out in the release notesA noteworthy issue to call out in the release notestheme: observabilityIssues related to observabilityIssues related to observabilitytype: enhancementA general enhancementA general enhancement
Milestone
Description
This issue was originally reported here: #34508 (comment) by @chicobento:
Hi @jonatan-ivanov , we are facing some issues integrating this into our project. The scenario is the following:
- we have a custom class that implements
SpanExporterinterface and internally wraps our own mutableOtlpHttpSpanExporter- with this, we need to prevent the
OtlpAutoConfigurationfrom creating theOtlpHttpSpanExporterBean. However, the @ConditionalOnMissingBean is based only on OtlpHttpSpanExporter and OtlpGrpcSpanExporter beans, which is not our case as we implementSpanExporterinterface and cannnot descend from theOtlpHttpSpanExportersince its finalSome possible solutions to my problem that I tried:
- Remove
OtlpAutoConfiguration: this behavior is added by a internal library, so I cannot easily remove theOtlpAutoConfigurationwithout impacting the applications that uses our lib- Replace the
SpanProcessor: as theOpenTelemetryAutoConfiguration.otelSpanProcessormethod does not have a@ConditionalOnMissingBean. I cannot easily replace theSpanProcessorwith a custom one that would ignore theOtlpHttpSpanExporterBean provided byOtlpAutoConfiguration- Replace the
OpenTelemetryAutoConfiguration.otelSdkTracerProvider: this would not work because theSpanProcessor.otelSpanProcessorwill always instantiate a BatchSpanProcessor and start its thread. I'd have to shutdown itDo you have any other suggestion on how can I overcome this ?
I was wondering if isn't the current
OtlpAutoConfiguration.otlpHttpSpanExporterfactory method too intrusive as it always provide aSpanExporterBean even when the application has already defined its ownSpanExporter? Can we change this to a simple@ConditionalOnMissingBean(SpanExporter.class)?
Metadata
Metadata
Assignees
Labels
status: noteworthyA noteworthy issue to call out in the release notesA noteworthy issue to call out in the release notestheme: observabilityIssues related to observabilityIssues related to observabilitytype: enhancementA general enhancementA general enhancement