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

Modify issue title #3547

Closed
AnonC0DER opened this issue Sep 19, 2024 · 1 comment
Closed

Modify issue title #3547

AnonC0DER opened this issue Sep 19, 2024 · 1 comment
Labels

Comments

@AnonC0DER
Copy link

I’m looking to enhance some issue titles by modifying them based on their error messages. I found it quite straightforward to implement this using the fingerprint rule in the Sentry UI. For instance, I created a rule like this:
message:"status 40*" -> user-fault-errors, title="User Error: Client Status 40x"

However, I’m having trouble locating the relevant information to achieve this using the SDK.
Am I looking for something that can't be done using the SDK?

@sentrivana
Copy link
Contributor

sentrivana commented Sep 20, 2024

Hey @AnonC0DER, thanks for the question.

There is no SDK API for this specifically. What you can do is have a look at how Sentry the UI computes the title from SDK event payload. Essentially, it first extracts some parts and then uses this to determine the title. Looks like it uses the exception dict to do this.

You have the whole SDK-side event payload available in before_send and any modifications done to it there will be persisted, so you could use this to modify the exception information in the payload. It's not really something I'd recommend though since I imagine it might mess up other parts of the UI that display data from the exception dict.

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

No branches or pull requests

2 participants