Skip to content

fix(tracing): Bound TTID/TTFD to prevent inflated transactions#6210

Open
antonis wants to merge 3 commits into
mainfrom
antonis/fix-ttid-deadline-exceeded
Open

fix(tracing): Bound TTID/TTFD to prevent inflated transactions#6210
antonis wants to merge 3 commits into
mainfrom
antonis/fix-ttid-deadline-exceeded

Conversation

@antonis
Copy link
Copy Markdown
Contributor

@antonis antonis commented May 22, 2026

📢 Type of change

  • Bugfix

📜 Description

Apply the existing 30s TIME_TO_DISPLAY_TIMEOUT_MS deadline to TTID spans (both automatic and manual) and to the transaction timestamp extension logic. Previously only TTFD had a deadline guard, and even TTFD's guard didn't prevent the transaction event.timestamp from being extended.

💡 Motivation and Context

Fixes #6208

On Android with enableTimeToInitialDisplay: true, when a ScreenStackFragment view is destroyed (e.g., navigating away in a Stack > Tab > Stack hierarchy) and later recreated (e.g., POP back), RNSentryReactFragmentLifecycleTracer.onFragmentViewCreated re-registers a FirstDrawDoneListener. The captured draw timestamp can be minutes or days after the navigation span started. processEvent then unconditionally extended event.timestamp with this stale TTID, inflating navigation transactions to hours or days.

TTFD already had a deadline_exceeded status guard, but it wasn't applied to the transaction timestamp extension. TTID had no deadline guard at all. This change applies the same 30s deadline consistently to both TTID and TTFD across all code paths.

💚 How did you test it?

Manual, CI Checks

📝 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
  • No breaking changes

🔮 Next steps

…igation transactions

Apply the existing 30s deadline check to TTID spans and transaction timestamp
extension, preventing stale fragment re-creation timestamps from inflating
navigation transactions to hours or days on Android.

Fixes #6208

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

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


  • fix(tracing): Bound TTID/TTFD to prevent inflated transactions by antonis in #6210
  • chore(deps): update Maestro to v2.6.0 by github-actions in #6198
  • chore(deps): bump js-cookie from 3.0.5 to 3.0.7 by dependabot in #6203
  • chore(deps): bump @tootallnate/once from 2.0.0 to 2.0.1 by dependabot in #6206
  • chore(deps): update Sentry Android Gradle Plugin to v6.8.1 by github-actions in #6196
  • feat(core): Expose pauseAppHangTracking and resumeAppHangTracking APIs by antonis in #6192

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

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

Generated by 🚫 dangerJS against 456b148

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis antonis changed the title fix(tracing): Bound TTID/TTFD to 30s deadline to prevent inflated transactions fix(tracing): Bound TTID/TTFD to prevent inflated transactions May 22, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit aadab2b. Configure here.

…and fix formatting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis
Copy link
Copy Markdown
Contributor Author

antonis commented May 22, 2026

@sentry review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 456b148. Configure here.

@antonis antonis marked this pull request as ready for review May 22, 2026 10:38
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.

[Android] Unbounded ui.load.initial_display end timestamp inflates navigation transaction duration to days when ScreenStackFragment draws late

1 participant