getsentry / sentry-mobile-release-health-app

Sentry Mobile App
Other
45 stars 5 forks source link

feat: Manual Tracing - Idle Transaction #221

Closed denrase closed 2 years ago

denrase commented 3 years ago

Overview

Add a RouteObserver where transactions are started when new routes get pushed. They are finished after a fixed duration idle timer finished, when a new route is pushed, or when a route is popped.

It's mainly based on the feedback of you @ueman in #220 and your work here, thank you again!

Implementation

Other/Discussion

Screenshots

Screenshot 2021-11-18 at 15 32 03
ueman commented 3 years ago

Can't seem to find / main route on sentry.io. Is this an invalid name?

This is the initial route from here.

denrase commented 3 years ago

@ueman Yeah, but it doesn't show up for me on the projects performance page on sentry.io 🤔

Screenshot 2021-11-18 at 15 48 46
marandaneto commented 3 years ago

Should we also re-start transactions when going back to a route?

it depends if it's in memory, how does it work on flutter? if everything is in memory, it's not worth re-starting, we don't on Android.

marandaneto commented 3 years ago

Child operations/http calls that take longer than the idle timeout may not be be associated with the transaction.

that would probably require the waitForChildren feature, since this is likely the case for most of the spans.

marandaneto commented 3 years ago

Should we handle Popups or Modals differently?

they could be spans from the current transaction (the view that is parent of the modal/popup), otherwise its own transaction

marandaneto commented 3 years ago

Added a child span to multi step sync.

can you elaborate? not sure that I understood the topic

ueman commented 3 years ago

Should we handle Popups or Modals differently?

they could be spans from the current transaction (the view that is parent of the modal/popup), otherwise its own transaction

That's what I've done here. In theory popups and modals are quite short lived, so it should be fine but in praxis I can imagine that there are quite a few long lived popups/models 🤷‍♂️