Skip to content

Conversation

@denrase
Copy link
Collaborator

@denrase denrase commented Jan 17, 2022

📜 Description

Introduce option to trim end of Tracer root span to last child span.

💡 Motivation and Context

Automatic transactions from the SentryNavigator are always run for a fixed time, even though child spans might finish much sooner. With this PR, the longest running child span will also mark the end for the overall transaction.

Closes #668

💚 How did you test it?

Added unit tests.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

@denrase denrase self-assigned this Jan 17, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.70%. Comparing base (f84275e) to head (11b9226).
⚠️ Report is 1659 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #702      +/-   ##
==========================================
+ Coverage   90.67%   90.70%   +0.02%     
==========================================
  Files         104      104              
  Lines        3326     3335       +9     
==========================================
+ Hits         3016     3025       +9     
  Misses        310      310              

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

@denrase denrase changed the title Feat: Transaction Trimming Feat: Auto Transactions: Duration Trimming Jan 18, 2022
@denrase denrase marked this pull request as ready for review January 18, 2022 12:33
@denrase denrase requested a review from brustolin as a code owner January 18, 2022 12:33
@denrase denrase changed the title Feat: Auto Transactions: Duration Trimming Feat: Auto transactions duration trimming Jan 18, 2022
@marandaneto
Copy link
Contributor

@denrase we could also describe this behaviour in the docs https://docs.sentry.io/platforms/flutter/performance/instrumentation/automatic-instrumentation/#routing-instumentation

@marandaneto
Copy link
Contributor

@brustolin would you like to review this one? we might need something similar on iOS soon, thanks.

Copy link
Contributor

@brustolin brustolin left a comment

Choose a reason for hiding this comment

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

LGTM

@marandaneto
Copy link
Contributor

@denrase there are conflicts other than that, all good.

# Conflicts:
#	flutter/lib/src/navigation/sentry_navigator_observer.dart
#	flutter/test/sentry_navigator_observer_test.dart
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.

Auto Transactions: Duration Trimming

5 participants