-
Notifications
You must be signed in to change notification settings - Fork 353
genai: define cached tokens attributes #3163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b6742a2
4c0c5a5
7701cf3
bb8f2d4
66865f3
93b8638
2fdb340
468d5da
1c01bce
ec6f945
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| change_type: enhancement | ||
| component: gen-ai | ||
| note: Add cache token attributes and provider-specific normalization guidance for GenAI usage metrics | ||
| issues: [1959] | ||
| subtext: | | ||
| - Add `gen_ai.usage.cache_read.input_tokens` attribute for tokens served from provider cache | ||
| - Add `gen_ai.usage.cache_creation.input_tokens` attribute for tokens written to provider cache | ||
| - Add provider-specific token handling notes to OpenAI span | ||
| - Add Anthropic span with computation guidance for `gen_ai.usage.input_tokens` | ||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be recorded in metrics as well? Assuming yes, what should the gen_ai.token.type be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stephentoub not yet, there is no metric definition for it (no type defined). There are probably some design flaws we'll need to fix to make it happen. Created https://github.com/open-telemetry/semantic-conventions/issues/3341 so we don't forget