Skip to content

Consider simplifying OpenTelemetryAutoConfiguration #36248

Open
@vpavic

Description

@vpavic

OpenTelemetryAutoConfiguration in its current shape contributes quite a few beans to the application context. In reality, most of those beans aren't likely be used anywhere (outside of contributing to OpenTelemetry bean) and appear to have been registered as beans just for the sake of being overridable (as they're @ConditionalOnMissingBean). However, the same effect (with lesser impact to application context) could have been achieved by having OpenTelemetry @Bean method accepting ObjectProvider arguments for different OTel components it depends on. Consequently, if I'm taking full control and configuring OpenTelemetry bean on my own, I'll still have all those OTel-related beans contributed to the application context.

So my proposal is to look into minimizing the number of OTel-related beans contributed to the application context, ideally reducing it to just OpenTelemetry bean.

More generally, the Actuator appears to me to be getting more and more bulky with time, and I'd like to see its impact on application context to be minimized, where possible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions