genai: define reasoning tokens attribute#3383
Merged
lmolkova merged 1 commit intoopen-telemetry:mainfrom Apr 27, 2026
Merged
Conversation
3 tasks
lmolkova
reviewed
Feb 7, 2026
lmolkova
approved these changes
Feb 8, 2026
kamphaus
approved these changes
Feb 8, 2026
8 tasks
Contributor
Author
|
@lmolkova what else is needed to get this merged? |
Member
|
@verdie-g could you please follow up on #3383 (comment) ? we should have reasoning attributes on common GenAI span |
d90b659 to
482776f
Compare
DylanRussell
approved these changes
Mar 5, 2026
|
this LGTM now |
lmolkova
reviewed
Mar 6, 2026
lmolkova
reviewed
Mar 9, 2026
lmolkova
reviewed
Mar 9, 2026
lmolkova
reviewed
Mar 9, 2026
ee7c351 to
b978fab
Compare
trask
reviewed
Mar 9, 2026
b978fab to
cb9033c
Compare
singankit
reviewed
Mar 27, 2026
Member
|
thanks @verdie-g! I posted a prototype for this at trask/genai-otel-conformance#143 |
This was referenced Apr 7, 2026
lmolkova
reviewed
Apr 14, 2026
Member
|
@verdie-g thanks for the contribution! would you be interested in making final fixes on this PR? It seems there are some unintentional changes that are blocking it. Let me know if you need any help, thanks! |
cb9033c to
5b3b199
Compare
|
|
Add reasoning output tokens attribute to track tokens used for reasoning (chain-of-thought, extended thinking). The attribute is added to the common GenAI inference client attributes and to the OpenAI-specific span with a mapping note.
5b3b199 to
7712cc8
Compare
Contributor
Author
|
@lmolkova I've reverted the changes to the specific providers so it doesn't create unrelated changes. |
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.
Fixes #3194
Changes
This PR adds a new GenAI attribute to represent reasoning tokens:
gen_ai.usage.reasoning.output_tokens.Merge requirement checklist
[chore]