-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Clarify that the auto-configured OpenTelemetry Resource will back off if you define your own #39372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The problem that you've described is a feature of how Spring Boot works. If the bean that you have replaced is the bean that was consuming and using the configuration properties, it is to be expected that those configuration properties will no longer have an effect. We can clarify this in the documentation by noting that the
Unfortunately, we can't do that. By defining your own
Unfortunately, I don't think we can do that. The Line 95 in f936356
|
@wilkinsona Thanks for the swift response.
We simply merge multiple
|
Closing in favor of #39509. |
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:
The documentation does not describe that exposing a
Resource
bean, will prevent the property from being able to provide attributes (unless the newly exposedResource
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
toSupplier<Resource>
, with anObjectProvider
being used to consume multiple user-defined beans? That way the user is more flexible with how and where things are set up.The text was updated successfully, but these errors were encountered: