Skip to content

Fix token metric unit to use UCUM format {token} - #7241

Merged
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:fixunit
Jan 29, 2026
Merged

Fix token metric unit to use UCUM format {token}#7241
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:fixunit

Conversation

@stephentoub

@stephentoub stephentoub commented Jan 29, 2026

Copy link
Copy Markdown
Member
Microsoft Reviewers: Open in CodeFlow

@stephentoub
stephentoub requested a review from tarekgh January 29, 2026 23:02
@stephentoub
stephentoub requested a review from a team as a code owner January 29, 2026 23:02
Copilot AI review requested due to automatic review settings January 29, 2026 23:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the OpenTelemetry metric unit for token counts to the UCUM-compliant format expected by GenAI semantic conventions.

Changes:

  • Change TokensUnit from "token" to "{token}" in OpenTelemetryConsts.

@tarekgh tarekgh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@stephentoub
stephentoub enabled auto-merge (squash) January 29, 2026 23:37
@stephentoub
stephentoub merged commit 140e405 into dotnet:main Jan 29, 2026
12 of 13 checks passed
This was referenced Feb 11, 2026
This was referenced Feb 26, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants