sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

App Hang Report whitelist

Open kingnight opened this issue 1 year ago • 2 comments

Problem Statement

Sentry App hang monitors whether there is a whitelist or blacklist mechanism that can exclude certain classes of monitoring and do filtered reporting

Solution Brainstorm

No response

Are you willing to submit a PR?

No response

kingnight avatar Apr 26 '24 06:04 kingnight

No there isn't an allow or denylist for app hang reports, but you can use beforeSend to filter out unwanted app hang events:

options.beforeSend = { event in
    if (event.exceptions?.first?.type == "App Hanging") {
        // do your stuff
    }
    
    return event
}

philipphofmann avatar Apr 26 '24 07:04 philipphofmann

PR for updating the docs https://github.com/getsentry/sentry-docs/pull/9822.

philipphofmann avatar Apr 26 '24 07:04 philipphofmann

We don't see a high demand for this right now. You can use the workaround specified in https://github.com/getsentry/sentry-cocoa/issues/3906#issuecomment-2078762754. We can close this.

philipphofmann avatar May 22 '24 12:05 philipphofmann