You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#10292 is re-using the OTLP exporter logic from SDK auto-config.
There are still parts of the SDK auto-config that are not re-used currently, such as sampler
Technically, we could call the auto-config as a black box - and it would respect the spring properties.
What are the problems with this approach?
Users cannot supply beans programmatically, because the entire object graph is created in auto-config. Example: SdkLoggerProvider
SpiHelper uses META-INF loading (example) - wheres in Spring, users expect that @Beans are collected - we should probably load both to meet the expectations of Spring users and library authors alike.
Use Case 1: User supplies tracer provider
As a spring boot user, I want to provide my own instance of SdkTracerProvider (but let the framework configure the rest).
I'll configure the SdkTracerProvider programatically, using SdkTracerProvider.builder()....
Right now, this use case is supported with @ConditionalOnMissingBean, which instructs spring to prefer a user supplied object if available:
#10292 is re-using the OTLP exporter logic from SDK auto-config.
There are still parts of the SDK auto-config that are not re-used currently, such as sampler
Technically, we could call the auto-config as a black box - and it would respect the spring properties.
What are the problems with this approach?
@Bean
s are collected - we should probably load both to meet the expectations of Spring users and library authors alike.Use Case 1: User supplies tracer provider
As a spring boot user, I want to provide my own instance of
SdkTracerProvider
(but let the framework configure the rest).I'll configure the
SdkTracerProvider
programatically, usingSdkTracerProvider.builder()...
.Right now, this use case is supported with
@ConditionalOnMissingBean
, which instructs spring to prefer a user supplied object if available:full code
The above code copies this part of the SDK auto-config code - just to add this annotation.
What can we do?
We can make the SpiHelper flexible enough that it allows
The text was updated successfully, but these errors were encountered: