-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Document java EnvironmentResourceProvider #6100
base: main
Are you sure you want to change the base?
Document java EnvironmentResourceProvider #6100
Conversation
coordinates. | ||
**NOTE**: The `otel.service.name` and `otel.resource.attributes` system | ||
properties / environment variables are interpreted in the | ||
`io.opentelemetry.sdk.autoconfigure.internal.EnvironmentResourceProvider` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The internal
package looks ugly here. Since we need to document the FQCN of resource providers, we should probably consider promoting this to a non-internal package.
But that's beside the point of this PR. For now minimally need to document the state of things as they are now.
@@ -138,6 +138,8 @@ Properties for disabling the [SDK](../sdk/#opentelemetrysdk): | |||
returns a minimally configured instance (for example, | |||
`OpenTelemetrySdk.builder().build()`). | |||
|
|||
#### Properties: resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bundling in resource configuration options with generate makes it hard to find resource options. Breaking out a separate section should make it more discoverable.
@jack-berg happy to merge, there are 2 outstanding discussions, can they be resolved? |
@jack-berg since this will change in 8 days now, should we wait? |
I'm fine holding off. |
|
||
**NOTE**: The `otel.service.name` and `otel.resource.attributes` system | ||
properties / environment variables are interpreted in the | ||
`io.opentelemetry.sdk.autoconfigure.EnvironmentResourceProvider` resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be the FQCN after open-telemetry/opentelemetry-java#7052 is merged and released in the upcoming 2/7/25 release of v1.47.0.
Should hold off merging until then.
Was working with a colleague trying to opt into specific resource providers, and we were surprised to find the apps
service.name
and attributes fromOTEL_RESOURCE_ATTRIBUTES
went missing.Then I remembered that java organizes the code that interprets
OTEL_SERVICE_NAME
andOTEL_RESOURCE_ATTRIBUTES
as a resource detector. And that its currently undocumented.Adding documentation and a warning to help others from being surprised that
service.name
goes away when you setotel.java.enabled.resource-providers
unless you includeio.opentelemetry.sdk.autoconfigure.internal.EnvironmentResourceProvider
in the set.