Skip to content

fix(instrumentation): add OTEL_SEMCONV_STABILITY_OPT_IN to CLI args#4438

Open
alliasgher wants to merge 2 commits intoopen-telemetry:mainfrom
alliasgher:fix-semconv-stability-cli-arg
Open

fix(instrumentation): add OTEL_SEMCONV_STABILITY_OPT_IN to CLI args#4438
alliasgher wants to merge 2 commits intoopen-telemetry:mainfrom
alliasgher:fix-semconv-stability-cli-arg

Conversation

@alliasgher
Copy link
Copy Markdown
Contributor

@alliasgher alliasgher commented Apr 14, 2026

Description

Register in opentelemetry-instrumentation/src/opentelemetry/instrumentation/environment_variables.py so that opentelemetry-instrument automatically exposes a --semconv_stability_opt_in CLI argument via its env-var-driven arg parser.

Without this registration the flag simply did not exist at the CLI level, forcing users to set the env var directly rather than using the instrumentation command's argument.

Fixes #3965

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Changelog entry added under Unreleased / Added

Copy link
Copy Markdown
Member

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you accidentally pushed unrelated changes to this particular PR. Please can you clean these up so it's just the env var change?

PS you'll also need to update the PR description to use the standard structure and add a changelog.

@github-project-automation github-project-automation Bot moved this to Reviewed PRs that need fixes in Python PR digest Apr 15, 2026
OTEL_SEMCONV_STABILITY_OPT_IN was not registered in environment_variables.py
so the opentelemetry-instrument CLI did not expose a --semconv_stability_opt_in
argument. Add the constant so the auto-instrumentation argument parser picks
it up through the opentelemetry_environment_variables entry-point.

Fixes open-telemetry#3965

Signed-off-by: alliasgher <alliasgher123@gmail.com>
@alliasgher alliasgher force-pushed the fix-semconv-stability-cli-arg branch from f761ca9 to 533693a Compare April 15, 2026 20:14
@alliasgher
Copy link
Copy Markdown
Contributor Author

Cleaned up — the branch now contains only the OTEL_SEMCONV_STABILITY_OPT_IN env var change. Will update the PR description and add a changelog entry.

Signed-off-by: Ali <alliasgher123@gmail.com>
Copy link
Copy Markdown
Member

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thanks @alliasgher 👍🏻

@github-project-automation github-project-automation Bot moved this from Reviewed PRs that need fixes to Approved PRs in Python PR digest Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

Equivalent command-line argument not available for OTEL_SEMCONV_STABILITY_OPT_IN environment variable

3 participants