Skip to content

Commit 5caa9ac

Browse files
alliasgherMikeGoldsmithaabmass
authored
fix(instrumentation): add OTEL_SEMCONV_STABILITY_OPT_IN to CLI args (#4438)
* fix(instrumentation): add OTEL_SEMCONV_STABILITY_OPT_IN to CLI args 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 #3965 Signed-off-by: alliasgher <alliasgher123@gmail.com> * chore: add CHANGELOG entry for #4438 Signed-off-by: Ali <alliasgher123@gmail.com> --------- Signed-off-by: alliasgher <alliasgher123@gmail.com> Signed-off-by: Ali <alliasgher123@gmail.com> Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com> Co-authored-by: Aaron Abbott <aaronabbott@google.com>
1 parent 3c7c592 commit 5caa9ac

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3333
([#3898](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3898))
3434
- `opentelemetry-instrumentation`: Add experimental metrics attributes Labeler utility
3535
([#4288](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4288))
36+
- `opentelemetry-instrumentation`: Register `OTEL_SEMCONV_STABILITY_OPT_IN` in `environment_variables.py` so `opentelemetry-instrument` exposes a `--semconv_stability_opt_in` CLI argument
37+
([#4438](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4438))
3638

3739
### Fixed
3840

opentelemetry-instrumentation/src/opentelemetry/instrumentation/environment_variables.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@
2222
"""
2323
.. envvar:: OTEL_PYTHON_AUTO_INSTRUMENTATION_EXPERIMENTAL_GEVENT_PATCH
2424
"""
25+
26+
OTEL_SEMCONV_STABILITY_OPT_IN = "OTEL_SEMCONV_STABILITY_OPT_IN"
27+
"""
28+
.. envvar:: OTEL_SEMCONV_STABILITY_OPT_IN
29+
30+
Opt-in to stable semantic convention signals.
31+
Comma-separated list of signals, e.g. ``http``, ``http/dup``.
32+
"""

0 commit comments

Comments
 (0)