-
-
Notifications
You must be signed in to change notification settings - Fork 352
feat: Allow error event value (description) to be customised #2120
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
feat: Allow error event value (description) to be customised #2120
Conversation
If one isn't available, the system will automatically default to one based on the domain and code.
The system default is otherwise a bit long.
This avoids the problem of localized descriptions being locale-dependent.
Merge Upstream into fork branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small note, apart from that LGTM. Thanks a lot, @lukeredpath 👏
And don't worry about CI. The failing jobs don't work for contributors and we didn't fix them yet.
Can you please open a PR to the docs? What you have in lukeredpath/sentry-docs#1 looks fine. I think it's worth mentioning for which SDK versions this feature will be available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot 😁
@lukeredpath, I can't merge because there are some conflicts that must be resolved |
@philipphofmann resolved! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
📜 Description
Currently errors are hardcoded to use "Code: xxx" using the error's code which make for a very unhelpful display in the Sentry error list.
To alleviate this, check for the presence of a custom description in the error's
userInfo
dictionary using theNSDebugDescriptionErrorKey
If no custom description is set, the old behaviour is retained of using "Code: xxx".
💡 Motivation and Context
Makes it easier to identify errors in the error list in the Sentry dashboard.
Fixes #1442.
💚 How did you test it?
Integrated the branch into our own app and ran it, generated some errors and verified that the error was displayed correctly.
We have been running this branch in production in the Community app since I opened this PR without issue.
📝 Checklist
🔮 Next steps