Skip to content

Fix navigator observer behaviour on didPush root#3111

Merged
buenaflor merged 9 commits into
mainfrom
fix/navigator-observer-root-behaviour
Jul 28, 2025
Merged

Fix navigator observer behaviour on didPush root#3111
buenaflor merged 9 commits into
mainfrom
fix/navigator-observer-root-behaviour

Conversation

@buenaflor

@buenaflor buenaflor commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

📜 Description

On initial app start we should not:

  • clear or start Time To Display tracking -> taken care of by app start integrations
  • generate a new trace id because -> already created during SentryFlutter.init

💡 Motivation and Context

Fixes issues where trace ids are wrong and TTFD not working for root

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • 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
  • All tests passing
  • No breaking changes

🔮 Next steps

@codecov

codecov Bot commented Jul 28, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.34%. Comparing base (eca355d) to head (9ca93c4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3111      +/-   ##
==========================================
+ Coverage   87.66%   88.34%   +0.67%     
==========================================
  Files         288       98     -190     
  Lines        9813     3560    -6253     
==========================================
- Hits         8603     3145    -5458     
+ Misses       1210      415     -795     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1241.27 ms 1251.69 ms 10.42 ms
Size 7.86 MiB 9.44 MiB 1.58 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
2d34233 1258.19 ms 1268.92 ms 10.73 ms
575ebaa 1262.20 ms 1274.24 ms 12.04 ms
640ad0c 1241.04 ms 1253.96 ms 12.92 ms
ec78888 1251.37 ms 1269.40 ms 18.04 ms
93b7728 1247.23 ms 1264.87 ms 17.64 ms
2cf9161 1248.33 ms 1266.55 ms 18.22 ms
b6c8720 1252.65 ms 1266.61 ms 13.96 ms
6ba4675 1223.12 ms 1238.17 ms 15.04 ms
dbd526b 1244.78 ms 1259.02 ms 14.24 ms
73dca78 1246.65 ms 1265.42 ms 18.76 ms

App size

Revision Plain With Sentry Diff
2d34233 7.86 MiB 9.44 MiB 1.58 MiB
575ebaa 7.86 MiB 9.44 MiB 1.58 MiB
640ad0c 7.86 MiB 9.44 MiB 1.58 MiB
ec78888 7.86 MiB 9.44 MiB 1.58 MiB
93b7728 7.86 MiB 9.44 MiB 1.58 MiB
2cf9161 7.86 MiB 9.44 MiB 1.58 MiB
b6c8720 7.86 MiB 9.44 MiB 1.58 MiB
6ba4675 7.86 MiB 9.44 MiB 1.58 MiB
dbd526b 7.86 MiB 9.44 MiB 1.58 MiB
73dca78 7.86 MiB 9.44 MiB 1.58 MiB

Previous results on branch: fix/navigator-observer-root-behaviour

Startup times

Revision Plain With Sentry Diff
4eebf90 1262.40 ms 1268.57 ms 6.18 ms
5553a81 1254.96 ms 1268.15 ms 13.19 ms

App size

Revision Plain With Sentry Diff
4eebf90 7.86 MiB 9.44 MiB 1.58 MiB
5553a81 7.86 MiB 9.44 MiB 1.58 MiB

@github-actions

github-actions Bot commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 475.72 ms 555.77 ms 80.04 ms
Size 6.54 MiB 7.70 MiB 1.16 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
aeb02f2 373.84 ms 437.00 ms 63.16 ms
6f47800 451.04 ms 509.64 ms 58.60 ms
eca355d 485.50 ms 569.85 ms 84.35 ms
b6c8720 457.41 ms 519.04 ms 61.63 ms
575ebaa 478.00 ms 585.76 ms 107.76 ms
827bf09 475.40 ms 547.14 ms 71.74 ms
2d34233 470.54 ms 558.90 ms 88.36 ms
0fb45d0 482.79 ms 554.02 ms 71.23 ms
81f83eb 471.40 ms 522.14 ms 50.74 ms
9b99523 456.91 ms 490.55 ms 33.64 ms

App size

Revision Plain With Sentry Diff
aeb02f2 6.54 MiB 7.69 MiB 1.15 MiB
6f47800 6.54 MiB 7.69 MiB 1.15 MiB
eca355d 6.54 MiB 7.70 MiB 1.16 MiB
b6c8720 6.54 MiB 7.69 MiB 1.15 MiB
575ebaa 6.54 MiB 7.69 MiB 1.15 MiB
827bf09 6.54 MiB 7.53 MiB 1015.27 KiB
2d34233 6.54 MiB 7.55 MiB 1.01 MiB
0fb45d0 6.54 MiB 7.70 MiB 1.17 MiB
81f83eb 6.54 MiB 7.69 MiB 1.15 MiB
9b99523 6.54 MiB 7.69 MiB 1.15 MiB

Previous results on branch: fix/navigator-observer-root-behaviour

Startup times

Revision Plain With Sentry Diff
5553a81 521.24 ms 557.67 ms 36.43 ms
4eebf90 461.39 ms 546.27 ms 84.88 ms

App size

Revision Plain With Sentry Diff
5553a81 6.54 MiB 7.70 MiB 1.16 MiB
4eebf90 6.54 MiB 7.70 MiB 1.16 MiB

@buenaflor buenaflor changed the title [DRAFT]: Fix navigator observer behaviour on didPush root Fix navigator observer behaviour on didPush root Jul 28, 2025
@buenaflor
buenaflor marked this pull request as ready for review July 28, 2025 12:42

@denrase denrase 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 👍

Comment thread flutter/lib/src/navigation/sentry_navigator_observer.dart
@buenaflor
buenaflor merged commit 200cceb into main Jul 28, 2025
70 checks passed
@buenaflor
buenaflor deleted the fix/navigator-observer-root-behaviour branch July 28, 2025 13:14
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