OpenAI Instrumentation: Switch to Latest GenAI SemConv Path (chat)#108
Open
lzchen wants to merge 1 commit into
Open
OpenAI Instrumentation: Switch to Latest GenAI SemConv Path (chat)#108lzchen wants to merge 1 commit into
lzchen wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR advances the OpenAI GenAI instrumentation migration by removing runtime routing to the legacy semantic-conventions path and rebaselining test configuration toward the latest-only behavior, as part of issue #107’s staged plan.
Changes:
- Update OpenAI instrumentor to always use the “new” (util/handler-based) chat-completions wrappers and instrument Responses unconditionally when available.
- Rebaseline OpenAI tests to no longer parametrize legacy semconv mode in
content_mode. - Add a towncrier changelog fragment describing the latest-semconv-only switch.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| instrumentation/opentelemetry-instrumentation-genai-openai/tests/conftest.py | Removes legacy semconv parameterization from the shared content_mode fixture. |
| instrumentation/opentelemetry-instrumentation-genai-openai/src/opentelemetry/instrumentation/genai/openai/init.py | Removes legacy wrapper routing and updates user-facing configuration docs. |
| instrumentation/opentelemetry-instrumentation-genai-openai/.changelog/PR_NUMBER.changed | Adds a changelog fragment (currently with a placeholder filename). |
lmolkova
reviewed
Jun 2, 2026
lzchen
commented
Jun 3, 2026
| and does not capture prompt or completion content. Behavior is controlled | ||
| via environment variables: | ||
|
|
||
| - ``OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental`` - opt into the |
Contributor
Author
There was a problem hiding this comment.
Did we want to eventually change genai utils to not rely on stability opt in env var to enable content capture?
lmolkova
approved these changes
Jun 5, 2026
Comment on lines
+72
to
+73
| # (False, "True") is not tested because the instrumentation always emits | ||
| # gen_ai.provider.name (latest semconv) on spans regardless of OTEL_SEMCONV_STABILITY_OPT_IN. |
Member
There was a problem hiding this comment.
Suggested change
| # (False, "True") is not tested because the instrumentation always emits | |
| # gen_ai.provider.name (latest semconv) on spans regardless of OTEL_SEMCONV_STABILITY_OPT_IN. |
will be more confusing than helpful once we clean things up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #107
Splitting this up into several smaller PRs for easier review.