Skip to content

Clarify that the auto-configured OpenTelemetry Resource will back off if you define your own #39372

@wleese

Description

@wleese

Spring Boot 3.2.0 exposes Resource as a Bean, as a way to specify attributes to be included in tracing exports.

There is also a property map management.opentelemetry.resource-attributes, which allows the same via property configuration.

In the documentation, one can read:

Additionally, it provides a Resource bean. The attributes of the Resource can be configured via the management.opentelemetry.resource-attributes configuration property.

The documentation does not describe that exposing a Resource bean, will prevent the property from being able to provide attributes (unless the newly exposed Resource bean, implements it).

It would be more logical if the property was always used when provided by the user.

May I also suggest moving from Resource to Supplier<Resource>, with an ObjectProvider being used to consume multiple user-defined beans? That way the user is more flexible with how and where things are set up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions