feat(attributes): Add legacy gen_ai cache token attributes (deprecated) - #582
feat(attributes): Add legacy gen_ai cache token attributes (deprecated)#582JPeer264 wants to merge 1 commit into
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Other
Bug Fixes 🐛Names
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
dc77968 to
ab3ae01
Compare
533dfee to
f60ca02
Compare
ab3ae01 to
b46370a
Compare
vgrozdanic
left a comment
There was a problem hiding this comment.
we need to first update the relay code for cost calculation before we can merge this, we currently never read gen_ai.usage.cache_creation.input_tokens in relay, and this change would make relay rewrite all the older fields to this new field gen_ai.usage.cache_creation.input_tokens.
This is a good change, we just need to first catch up with it in other places (and product potentially).
I see that OTEL has changed this last week: https://github.com/open-telemetry/semantic-conventions-genai/blob/67dff024110be5bd9f318006e733f4078e0f4c97/changelog.d/440.breaking.md?plain=1#L1
b46370a to
a8b4527
Compare
f60ca02 to
1279ca8
Compare
Adds `gen_ai.usage.cache_creation_input_tokens` and `gen_ai.usage.cache_read_input_tokens`, which the JavaScript SDK stopped emitting in v11 in favour of the dotted `gen_ai.usage.cache_*.input_tokens` names. Both join the existing alias groups that already hold the Vercel AI spellings. Deprecated by getsentry/sentry-javascript#22811 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
a8b4527 to
0957123
Compare
Relay will handle this quite well already, i wasn't aware that we don't have to worry about this, so this change is safe |
Adds
gen_ai.usage.cache_creation_input_tokensandgen_ai.usage.cache_read_input_tokens, which the JavaScript SDK stopped emitting in v11 in favour of the dottedgen_ai.usage.cache_*.input_tokensnames.Both join the existing alias groups that already hold the Vercel AI spellings
gen_ai.usage.input_tokens.cache_writeandgen_ai.usage.input_tokens.cached.Deprecated by getsentry/sentry-javascript#22811