open-telemetry / open-telemetry/opentelemetry-java-instrumentation
Make SemconvStability config work without GlobalOpenTelemetry
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1.2k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 214
Description
SemconvStability currently resolves declarative config from GlobalOpenTelemetry.getOrNoop() during static initialization. This means library instrumentation users who pass an OpenTelemetry instance directly to an instrumentation builder do not get semconv stability config from that instance unless they also install it globally.
Library instrumentation should be able to honor semconv stability config from the supplied OpenTelemetry instance, without requiring GlobalOpenTelemetry.set(...).
The affected settings are:
general.semconv_stability.opt_ingeneral.semconv_stability.previewcommon.v3_preview
Investigated a bit: would likely mean a new pattern of injecting OpenTelemetry (or maybe better ConfigProvider) into all of the
Extractors. Tracking issue for ConfigProvider stability (see https://github.com/open-telemetry/opentelemetry-java/issues/7961.
Note: I don't think this needs to happen for 3.0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing SemconvStability's static initialization and the Extractors mentioned in the issue, then inspect how instrumentation builders pass an OpenTelemetry instance. Done means the three listed semconv stability settings are honored from that supplied instance without requiring GlobalOpenTelemetry.set(...).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100