Skip to content

[google-genai] Add gen_ai.usage.reasoning.output_tokens span attribute#4276

Draft
Rima-ag wants to merge 8 commits intoopen-telemetry:mainfrom
Rima-ag:thoughts-span-attribute
Draft

[google-genai] Add gen_ai.usage.reasoning.output_tokens span attribute#4276
Rima-ag wants to merge 8 commits intoopen-telemetry:mainfrom
Rima-ag:thoughts-span-attribute

Conversation

@Rima-ag
Copy link
Contributor

@Rima-ag Rima-ag commented Feb 28, 2026

Description

Add gen_ai.usage.reasoning.output_tokens span attribute to Google genai instrumentation.

This is still pending merging: #4206 that includes thinking tokens in gen_ai.usage.output_tokens.

Fixes #3890
Related to open-telemetry/semantic-conventions#3194 and #4159

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Unit Tests

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Google GenAI instrumentation needs to count thinking tokens

1 participant