Skip to content

feat(attributes): Deprecate sentry.transaction - #345

Merged
buenaflor merged 2 commits into
mainfrom
feat/deprecate-sentry-transaction
May 4, 2026
Merged

feat(attributes): Deprecate sentry.transaction#345
buenaflor merged 2 commits into
mainfrom
feat/deprecate-sentry-transaction

Conversation

@buenaflor

@buenaflor buenaflor commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Deprecate sentry.transaction in favor of sentry.segment.name.

The segment name is the preferred attribute going forward, so this marks sentry.transaction for backfill-based deprecation and updates the existing transaction alias to point at the same replacement.

Mark sentry.transaction as deprecated in favor of sentry.segment.name and
keep the transaction alias group symmetric across generated packages.

Co-Authored-By: Claude <[email protected]>
Made-with: Cursor
Copilot AI review requested due to automatic review settings April 29, 2026 12:08
@buenaflor
buenaflor requested review from a team, Lms24, cleptric, lcian, mjq and nsdeschenes as code owners April 29, 2026 12:08
@github-actions

github-actions Bot commented Apr 29, 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

  • Deprecate sentry.transaction by buenaflor in #345
  • Add sentry.profile_id by loewenheim in #344
  • Add http.request_method by loewenheim in #343
  • Add middleware.name attribute by ericapisani in #337
  • Add http.request.body.data attribute by ericapisani in #336
  • Add device.low_power_mode attribute for iOS by itaybre in #314

Other

  • Add messaging.batch.message_count by JPeer264 in #341
  • Add db.redis.key by sentrivana in #326
  • Add process.command_args by sentrivana in #327

Bug Fixes 🐛

  • Align code.function.name description with OTel by alexander-alderman-webb in #335
  • Don't backfill sentry.browser.* attributes by loewenheim in #339
  • Backfill several deprecated attributes by loewenheim in #332

Internal Changes 🔧

Deps

  • Bump black from 24.8.0 to 26.3.1 by tobias-wilfert in #342
  • Bump astro from 6.0.2 to 6.1.6 in /docs by dependabot in #330

Other

  • (attributes) Mark deprecated gen_ai and ai attributes as backfill by vgrozdanic in #333

🤖 This preview updates automatically when you update the PR.

Record PR 345 in the affected attribute changelogs and regenerate package
metadata so the next release captures the deprecation update.

Co-Authored-By: Claude <[email protected]>
Made-with: Cursor
@mjq

mjq commented Apr 29, 2026

Copy link
Copy Markdown
Member

I agree in principle but this one needs extremely careful checking across the board before merge please - IIRC currently both this and sentry.segment.name are in use but in different places, and there's a pretty high possibility something breaks.

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

Deprecates sentry.transaction in favor of sentry.segment.name, and updates the existing transaction alias/deprecation metadata so all alias relationships and generated language outputs agree on the replacement path.

Changes:

  • Mark transaction and sentry.transaction as backfill deprecations targeting sentry.segment.name.
  • Update alias groups to keep transaction / sentry.transaction / sentry.segment.name symmetric across model JSON.
  • Regenerate derived artifacts for JS/Python and shared/deprecated_attributes.json.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
shared/deprecated_attributes.json Regenerated deprecated-attribute export reflecting the new replacement and added deprecated entry for sentry.transaction.
model/attributes/transaction.json Updates transaction deprecation to backfill into sentry.segment.name and expands aliases to include the full group.
model/attributes/sentry/sentry__transaction.json Adds deprecation metadata for sentry.transaction and aligns aliases with the group.
model/attributes/sentry/sentry__segment__name.json Adds aliases so the preferred attribute acknowledges the deprecated names.
javascript/sentry-conventions/src/attributes.ts Regenerated TS constants/docs/metadata to reflect the new aliases + deprecation target.
python/src/sentry_conventions/attributes.py Regenerated Python constants/docs/metadata; adds SENTRY_TRANSACTION to the deprecated warning set and updates deprecation/alias metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread model/attributes/sentry/sentry__transaction.json
Comment thread model/attributes/transaction.json
@buenaflor

Copy link
Copy Markdown
Contributor Author

I agree in principle but this one needs extremely careful checking across the board before merge please - IIRC currently both this and sentry.segment.name are in use but in different places, and there's a pretty high possibility something breaks.

yeah definitely, I'll let this one sit for a while and investigate a bit, it's not critical

I noticed some dashboards are currently not working with span v2 since they require the "transaction" attribute (which is not backfilled or coalesced without the deprecation)

@mjq

mjq commented Apr 29, 2026

Copy link
Copy Markdown
Member

@buenaflor Gotcha, that makes sense. I'm going on vacation for a bit but I bet @jameskeane can help sort out dashboard team help for the investigation if that's useful.

@buenaflor

Copy link
Copy Markdown
Contributor Author

I double checked and found no potential issues in deprecating it in favour of sentry.segment.name

@buenaflor
buenaflor merged commit 33a8089 into main May 4, 2026
14 checks passed
@buenaflor
buenaflor deleted the feat/deprecate-sentry-transaction branch May 4, 2026 14:15
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.

4 participants