open-telemetry / open-telemetry/opentelemetry-java-instrumentation

Make SemconvStability config work without GlobalOpenTelemetry

Open
#18,938 4 comments 0 reactions 0 assignees View on GitHub

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_in
  • general.semconv_stability.preview
  • common.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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.