Allow to customize only SpanProcessor bean without the need to throw away all OpenTelemetryAutoConfiguration value. This is the only one bean in this class which is not annotated with @ConditionalOnMissingBean.

Comment From: pivotal-cla

@mmeller-wikia Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@mmeller-wikia Thank you for signing the Contributor License Agreement!

Comment From: wilkinsona

The lack of @ConditionalOnMissingBean is intentional. It was removed as part of #32480. The intention is to allow additional span processors to be defined while keeping the default span processor. I'm afraid we cannot make the proposed change as it would break anyone that currently relies upon it. Thanks anyway for the suggestion. If you would like us to consider ways in which we can make it easier to replace the default span processor without breaking those who are relying on the current behaviour, please open an issue explaining your use case.

Comment From: mmeller-wikia

Thanks for clarification and quick response :) I was hoping to use BatchSpanProcessorBuilder.setMeterProvider() to collect metrics from BatchSpanProcessor.Worker See https://github.com/open-telemetry/opentelemetry-java/blob/0bad3c982ad05f54461e241f8a402536c6f9d4b9/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/export/BatchSpanProcessor.java#L187-L219

I was able to do this by creating @Primary SpanProcessor bean and redeclaring SdkTracerProvider (using only one SpanProcessor). One downside is that 2 SpanProcessor beans are created