Document java EnvironmentResourceProvider#6100
Document java EnvironmentResourceProvider#6100tiffany76 merged 5 commits intoopen-telemetry:mainfrom
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.
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.
| returns a minimally configured instance (for example, | ||
| `OpenTelemetrySdk.builder().build()`). | ||
|
|
||
| #### Properties: resource |
There was a problem hiding this comment.
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.
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.
|
Ok this is good to go now that |
Was working with a colleague trying to opt into specific resource providers, and we were surprised to find the apps
service.nameand attributes fromOTEL_RESOURCE_ATTRIBUTESwent missing.Then I remembered that java organizes the code that interprets
OTEL_SERVICE_NAMEandOTEL_RESOURCE_ATTRIBUTESas a resource detector. And that its currently undocumented.Adding documentation and a warning to help others from being surprised that
service.namegoes away when you setotel.java.enabled.resource-providersunless you includeio.opentelemetry.sdk.autoconfigure.internal.EnvironmentResourceProviderin the set.