-
Notifications
You must be signed in to change notification settings - Fork 994
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
📏 Standardize Error Keys #9251
Merged
Merged
📏 Standardize Error Keys #9251
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
135e1bb
Standardize error keys
landongrindheim a07aa22
Use constants to keep keys consistent
landongrindheim 372abcc
Use GROUPS (plural) for consistency
landongrindheim 5cb28bf
Send `fingerprint` to distinguish errors
landongrindheim f16011d
Rely on `T.unsafe` to access `#sentry_context`
landongrindheim c9a5812
Merge branch 'main' into standardize-error-reporting-keys
landongrindheim 56abecf
Merge branch 'main' into standardize-error-reporting-keys
landongrindheim d34dfb6
Merge branch 'main' into standardize-error-reporting-keys
landongrindheim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
along the lines of creating the ERROR_ATTRIBUTES constant; would it be useful to create a method to handle generating the
unknown_error_details
which accepts anderror
andjob
parameters? That would facilitate reuse and standardizationThere 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.
I considered this, but didn't pursue it because Service#capture_exception accepts other arguments for
job-dependencies
andjob-dependency-groups
. These are being provided in ErrorHandler#error_details_for. IMO, it'd be preferable to standardize usage, but I think that stretches the task I'm trying to complete a little too far.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.
Thanks, please for my learning; from this code, the
dependency
and thedependency-groups
seem to come from the samejob
value. If so, what are the tradeoffs being considered and the costs involved?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.
I'm not 100% sure I understand the question, but I'll speak to what I think I understand.
Within Service#capture_exception, we prioritize the values passed in as
dependency
anddependency_group
(exdependency&.name || job&.dependencies
). There's one place where these values are being provided 👇This method is being delegated to by other methods, which appear at pretty high levels 👇 I count seven places that would need to be updated/refactored to make this a re-usable method that only fetches the information from
job
. I don't love the current state, but I do see the value that's gained by getting reports about individual dependencies (vs all dependencies for the job).#handle_job_error
#handle_dependency_error