Skip to content

feat(attributes): update several attributes to their lates OTel representation#418

Merged
constantinius merged 1 commit into
mainfrom
constantinius/feat/attributes/gen_ai-update-to-latest-otel-spec
Jun 9, 2026
Merged

feat(attributes): update several attributes to their lates OTel representation#418
constantinius merged 1 commit into
mainfrom
constantinius/feat/attributes/gen_ai-update-to-latest-otel-spec

Conversation

@constantinius

@constantinius constantinius commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

OTel renamed several gen_ai attributes. This PR adds the new OTel-aligned names and deprecates the old Sentry names using the backfill strategy, per CONTRIBUTING.md.

Renames

Old (deprecated) New
gen_ai.usage.output_tokens.reasoning gen_ai.usage.reasoning.output_tokens
gen_ai.usage.input_tokens.cached gen_ai.usage.cache_read.input_tokens
gen_ai.usage.input_tokens.cache_write gen_ai.usage.cache_creation.input_tokens
gen_ai.response.time_to_first_token gen_ai.response.time_to_first_chunk

Closes https://linear.app/getsentry/issue/TET-2415/deprecate-gen-aiusageinput-tokenscached

PR Checklist

  • I have run yarn test and verified that the tests pass.
  • I have run yarn generate to generate and format code and docs.

If an attribute was added:

  • The attribute is in a namespace (e.g. nextjs.function_id, not function_id)
  • I have used the correct value for pii (i.e. maybe or true. Use false only for values that should never be scrubbed such as IDs)

If an attribute was deprecated:

@constantinius
constantinius requested review from a team, Lms24, cleptric, mjq and nsdeschenes as code owners June 9, 2026 11:48
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Update several attributes to their lates OTel representation by constantinius in #418
  • Add db.operation.batch.size by isaacs in #407
  • Add app.vitals.start.prewarmed attribute by itaybre in #379
  • Add and deprecate runtime context attributes by markushi in #383
  • Add Android Runtime (ART) GC and memory attributes by markushi in #382
  • Add db.stored_procedure.name and ensure span name attribute consistency by Lms24 in #398
  • Add Cloudflare SDK attributes by JPeer264 in #392

Other

  • Add missing GCP and FaaS attributes by ericapisani in #403

Bug Fixes 🐛

  • (attributes) Set pii: 'maybe' on faas string attributes by Lms24 in #415
  • (cloudfare) Add missing visibility attributes by markushi in #408

Internal Changes 🔧

  • (deps-dev) Bump vitest from 3.2.4 to 4.1.0 by dependabot in #409

🤖 This preview updates automatically when you update the PR.

@constantinius
constantinius requested a review from a team June 9, 2026 11:49
@linear-code

linear-code Bot commented Jun 9, 2026

Copy link
Copy Markdown

TET-2415

@constantinius
constantinius merged commit ff120df into main Jun 9, 2026
16 checks passed
@constantinius
constantinius deleted the constantinius/feat/attributes/gen_ai-update-to-latest-otel-spec branch June 9, 2026 12:20
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.

2 participants