-
Notifications
You must be signed in to change notification settings - Fork 78
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
LF-3914 Post (some) handled errors to Sentry #3025
Merged
kathyavini
merged 3 commits into
integration
from
LF-3914-post-some-handled-errors-to-sentry
Dec 5, 2023
Merged
LF-3914 Post (some) handled errors to Sentry #3025
kathyavini
merged 3 commits into
integration
from
LF-3914-post-some-handled-errors-to-sentry
Dec 5, 2023
Conversation
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
kathyavini
requested review from
antsgar,
SayakaOno and
navDhammu
and removed request for
a team
December 5, 2023 19:48
SayakaOno
previously approved these changes
Dec 5, 2023
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.
Let's test it!
The Jira ticket is linked instead of "Sentry docs" in the description 😉
Ooops, thank you! 😁 |
kathyavini
force-pushed
the
LF-3914-post-some-handled-errors-to-sentry
branch
2 times, most recently
from
December 5, 2023 22:17
83c146e
to
6eba324
Compare
kathyavini
force-pushed
the
LF-3914-post-some-handled-errors-to-sentry
branch
from
December 5, 2023 22:18
6eba324
to
2b38e47
Compare
kathyavini
force-pushed
the
LF-3914-post-some-handled-errors-to-sentry
branch
from
December 5, 2023 22:26
2b38e47
to
0e9ec16
Compare
SayakaOno
approved these changes
Dec 5, 2023
antsgar
pushed a commit
that referenced
this pull request
Dec 12, 2023
…rrors-to-sentry LF-3914 Post (some) handled errors to Sentry
antsgar
pushed a commit
that referenced
this pull request
Dec 12, 2023
…rrors-to-sentry LF-3914 Post (some) handled errors to Sentry
antsgar
pushed a commit
that referenced
this pull request
Dec 13, 2023
…rrors-to-sentry LF-3914 Post (some) handled errors to Sentry
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Update: we modified our Sentry permissions temporarily to allow troubleshooting from localhost. The issue format and stack trace look good and useable so I think it's fine to run on beta!
Description
Note: this relates to PR #3023 in that it piggy-backs on the Winston logger to get our errors to Sentry, but should be a standalone code change (i.e. doesn't depend on that PR's code changes).
This PR adds a custom Winston transport to send Error objects passed to Winston to Sentry, using
Sentry.captureException(error)
, see Sentry docs). Because our needs were minimal, I wrote a basic transport, similar to this StackOverflow example.I'm happy with the current output (although I wish it tracked users!). Just as a note, there is a more full-featured transport available here: winston-transport-sentry-node, (Source Code). I didn't use it because it has a bit more than we need (e.g. log levels), and I couldn't get it to work out-of-the-box, but it's a very popular package and always an option in the future.
Jira link: https://lite-farm.atlassian.net/browse/LF-3914
Type of change
How Has This Been Tested?
Tested by triggering the LF-3884 error from localhost with the environment code checks reversed (to run on
development
) and the beta sentry dsn key.Checklist: