Skip to content

chore(tracing): Remove unused maxTransactionDurationExceeded span attribute - #6820

Merged
antonis merged 4 commits into
mainfrom
chore/remove-maxtransactionduration-attribute
Oct 8, 2026
Merged

antonis merged 4 commits into
mainfrom
chore/remove-maxtransactionduration-attribute

Conversation

@antonis

@antonis antonis commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

adjustTransactionDuration (onSpanEndUtils.ts) set a maxTransactionDurationExceeded span-data flag alongside the deadline_exceeded status. This removes the flag (and the stale // TODO: check where was used, might be possible to delete next to it). The deadline_exceeded status and both duration guards (diff < 0, recorded-duration-exceeds-finalTimeout) are unchanged.

💡 Motivation and Context

The flag is a leftover from the old @sentry/tracing maxTransactionDuration option, which upstream replaced with finalTimeout in v7 (getsentry/sentry-javascript#5044). It only survives in archived @sentry/tracing mirrors.

Timeline

  • 2021-01-19 — maxTransactionDurationExceeded added to the RN SDK (#1230), mirroring the old @sentry/tracing adjustTransactionDuration (which set it as a tag).
  • 2022-05-06 — Upstream removes it in sentry-javascript v7.0.0 (#5044), replacing the maxTransactionDuration option with finalTimeout (the diff deletes transaction.setTag('maxTransactionDurationExceeded', 'true')).
  • 2024-05-29 — RN v8 migration (#3836) keeps the flag, now set as a span attribute, still alongside the deadline_exceeded status.
  • 2026-10 — Removed here, ~4.4 years after upstream dropped it. It was never deprecated in either repo — both removed it outright.

The deadline_exceeded status is set on the exact same transactions (the same if (isOutdatedTransaction) branch), and @sentry/core's idle span also emits it on finalTimeout, so it remains the signal to filter timed-out transactions on.

💚 How did you test it?

  • CI
  • Verified no usage in the org
  • Checked the data: Across configured queries (metric/issue alerts, saved searches, Discover saved queries, and dashboard widgets) there are 0 references of maxTransactionDurationExceeded, vs 171 orgs using the deadline_exceededstatus filter

📝 Checklist

  • I added tests to verify changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • No breaking changes.

🔮 Next steps

…ribute

The `adjustTransactionDuration` handler set a `maxTransactionDurationExceeded`
span-data flag alongside the `deadline_exceeded` status. The flag is a leftover
from the old `@sentry/tracing` `maxTransactionDuration` option, which upstream
replaced with `finalTimeout` in v7 (getsentry/sentry-javascript#5044). Nothing
consumes it: no references in sentry, relay, or current sentry-javascript, and
`@sentry/core` already records the modern equivalent
(`sentry.idle_span_finish_reason: "finalTimeout"`) when the idle span times out.

Drop the dead attribute. The `deadline_exceeded` status and both duration guards
are unchanged; tests still assert the status.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

⚪ None (no version bump detected)

📋 Changelog Preview

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


  • chore(tracing): Remove unused maxTransactionDurationExceeded span attribute by antonis in #6820
  • fix(core): preserve Hermes internal bytecode frames in Expo by Trancever in #6848
  • chore(core): Re-enable sdk/no-regexp-constructor lint rule by antonis in #6841
  • chore(deps): update Android SDK to v8.60.0 by github-actions in #6850
  • chore(deps): update Cocoa SDK to v9.30.1 by github-actions in #6849
  • feat(core): Report cellular network technology by alwx in #6827
  • test(e2e): Re-enable iOS view_names assertion in captureMessage test by antonis in #6846
  • fix(core): Strip callback options before the native SDK starts by alwx in #6847
  • fix(android): Resolve @sentry/react-native from rootDir in Expo plugin by alwx in #6840
  • chore: Clean up non-actionable TODOs by antonis in #6843
  • chore(deps): update JavaScript SDK to v10.76.0 by antonis in #6831
  • chore(expo): bump sample to Expo 57.0.26 by antonis in #6838
  • chore(deps): Bump basic-ftp to 6.2.2 by alwx in #6837
  • fix(core): Mark package as side-effect free by devclaimjuimperai in #6829
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.31.0 to 2.33.1 by dependabot in #6833
  • chore(deps): bump gradle/actions/setup-gradle from 6.3.0 to 6.4.0 by dependabot in #6834
  • chore(deps): bump getsentry/craft from 2.31.2 to 2.33.1 by dependabot in #6835
  • chore(deps): bump getsentry/github-workflows/validate-pr from 4013fc6e1aeb1be1f9d3b4d232624f0ec1afa613 to 36c729264d2edc29ebae61950c50e1e9f043ad7e by dependabot in #6832
  • fix(android): Settle initNativeReactNavigationNewFrameTracking promise by antonis in #6823
  • fix(spotlight): Forward image attachments to Spotlight by antonis in #6818
  • fix(ios): Prevent crash when initialized with an invalid DSN by antonis in #6825
  • chore(core): Resolve non-actionable TODOs by antonis in #6826
  • chore(core): resolve stale TODO comments by antonis in #6819
  • fix(profiling): Populate Hermes runtime version on JS profiles by antonis in #6817

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor
Fails
🚫 Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request

Generated by 🚫 dangerJS against 09ae81c

@antonis
antonis marked this pull request as ready for review October 1, 2026 13:50
Comment on lines 92 to -96

if (isOutdatedTransaction) {
span.setStatus({ code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' });
// TODO: check where was used, might be possible to delete
span.setAttribute('maxTransactionDurationExceeded', 'true');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Won't this be a break change with users alert filters?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you for calling this out @lucas-zimerman 🙇 I've rechecked the data with HEX: Across configured queries (metric/issue alerts, saved searches, Discover saved queries, and dashboard widgets) there are 0 references of maxTransactionDurationExceeded, vs 171 orgs using the deadline_exceededstatus filter.

if we decide to keep it as a minor, we should add a field on the changelog about it.

Makes sense 👍 Added a changelog entry. Also updated the PR description adding the full timeline of the attribute.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for your investigation!
It still could affect self hosted but id say so far so good for a release

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It still could affect self hosted but id say so far so good for a release

True 👍 I'd advocate on shipping the removal now and crossing this off but we could also keep it for the v9 bump. I'll leave the final approval to @alwx 🙇

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.

Sounds good. Approved but now merge conflicts need to be resolved as well :)

@lucas-zimerman

Copy link
Copy Markdown
Collaborator

if we decide to keep it as a minor, we should add a field on the changelog about it.

@antonis
antonis requested a review from lucas-zimerman October 5, 2026 07:18

@lucas-zimerman lucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@antonis
antonis enabled auto-merge (squash) October 8, 2026 09:46
@antonis
antonis merged commit 606fb09 into main Oct 8, 2026
59 of 74 checks passed
@antonis
antonis deleted the chore/remove-maxtransactionduration-attribute branch October 8, 2026 09:49
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.

3 participants