Skip to content

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

Open
antonis wants to merge 1 commit into
mainfrom
chore/remove-maxtransactionduration-attribute
Open

antonis wants to merge 1 commit 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.

💚 How did you test it?

📝 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(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 d41685c

@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?

@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.

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