getsentry / sentry-cocoa

The official Sentry SDK for iOS, tvOS, macOS, watchOS.
https://sentry.io/for/cocoa/
MIT License
798 stars 315 forks source link

Custom navigation controller getting all the automatic spans. #2767

Open brustolin opened 1 year ago

brustolin commented 1 year ago

Description

By using a custom navigation controller, or custom tabview controller, other automatic spans are being captured by it instead of the controller being navigated to.

image (3) image (2)

InterstellarStella commented 1 year ago

Ticket on Zendesk

brustolin commented 1 year ago

After investigating this, I found out that the controller are behaving as expected. But maybe we should change the behavior around container controllers such as NavigationControllers and TabViewControllers, because an app developer don't think of its controllers as being a child of such containers and would be nice to have transactions exclusive for the controllers within the container.

carlosnaguilera commented 1 year ago

Moreover, if transactions are linked to container view controllers. all of them can be linked to the same navigation controller instead of the specific child view controller that is managing the request.

I totally agree with the option of changing the behaviour and link spans to specific child view controllers instead of container view controllers

brustolin commented 1 year ago

We believe this is broken right now and we want to ignore all container controller, but still need to evaluate if this is a breaking change or not.