getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.72k stars 4.15k forks source link

Profiling: color code non-application user code (shared libraries etc). #69899

Open realkosty opened 5 months ago

realkosty commented 5 months ago

Problem Statement

On Android we currently color-code any frame outside of applicationID namespace as "system". This doesn't work well when I have

com.mycompany.android.* // application code
com.mycompany.common.* // general-purpose shared code

Solution Brainstorm

I'd consider the following in this order:

Product Area

Profiling

┆Issue is synchronized with this Jira Improvement by Unito

getsantry[bot] commented 5 months ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 5 months ago

Routing to @getsentry/product-owners-profiling for triage ⏲️

JonasBa commented 5 months ago

treat library frames as "Application" - what devs likely care about is whether they have control over the implementation of a function or not, not what namespace it's in.

We need to be careful about how we define control here. For example just because something is a system fn, it does not mean you dont have control over it. In most cases you can still have the ability to not call it regardless if it's a direct or indirect call.

The library option is interesting, but would only work in cases where library code can be somewhat reliably inferred and I dont know how well we can do that. That said, I think it's the correct way forward and would help in other areas.

Zylphrex commented 5 months ago

One possible path forward is to bring stack traces in profiles closer to stack traces in errors by supporting stack trace rules to process the frames and add the in app labels to some frames.