Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IgnoreErrors not filtering certain events. #817

Closed
rodolfoBee opened this issue Apr 15, 2024 · 4 comments · Fixed by #819
Closed

IgnoreErrors not filtering certain events. #817

rodolfoBee opened this issue Apr 15, 2024 · 4 comments · Fixed by #819

Comments

@rodolfoBee
Copy link
Member

Trying to filter the following errors on the SDK side:

*mysql.MySQLError
Error 188 (HY000): FTS query exceeds result cache limit

For that, we are using the ignoreErrors configuration with value: Error 188 (HY000): FTS query exceeds result cache limit, however it does not filter the events. Changing the filter to only FTS query exceeds result cache limit serves as a workaround.

opts := sentry.ClientOptions{
    Dsn: config.Sentry.Dsn,
    Debug: true,
    Integrations: func(i []sentry.Integration) []sentry.Integration {
            return i
    },
    IgnoreErrors: []string{
            "FTS query exceeds result cache limit",
    },
}

SDK version: 0.25.0.

@ribice
Copy link
Collaborator

ribice commented Apr 15, 2024

Since the values in IgnoreErrors are converted to regex patterns, characters ( and ) need to be escaped for this to work.

This is how you can add it:

IgnoreErrors: []string{`Error 188 \(HY000\): FTS query exceeds result cache limit`},

@cleptric
Copy link
Member

Could we change IgnoreErrors to take both regex and strings into account? Same for IgnoreTransactions.

@ribice
Copy link
Collaborator

ribice commented Apr 15, 2024

That's definitely a possibility. Is it handled that way in other SDKs?

@cleptric
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants