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
bug: add tag info to sentry error messages #372
Conversation
based on #373 need to make sure tag/"extra" fields are actually sent to sentry. |
@jrconlin - to confirm for the testing bit of this; have we verified manually in sentry that these tags appear as expected? |
@tublitzed They've not and thus the comment. |
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 just tested this locally against sentry with this test event - I'm not seeing any of these new tags.
Here's the tags I am seeing in Sentry:
If some tags wind up being harder to pass along than others, it might be a good idea to just start by adding the ones we really need right now to start with, and coming back in later for a more complete pass.
Right, there needs to be an explicit |
@jrconlin I'm not seeing any change between here and master related to errors appearing in Sentry. Here's what I'm doing:
The errors generated from this branch appear identical to what's coming from master. I'm confused around what you've changed here specifically related Sentry tags; I'm assuming that I'm just missing something obvious here....would you mind clarifying specifically the new fields that you've added to Sentry, and how we can test this to make sure they're appearing as expected? For reference, here are sentry errors from this branch vs sentry errors from master - AFAIK there is no new information there? Ie, all the tags look identical. |
@tublitzed Unfortunately, While not perfect, it gets us further than where we were without the tag info. |
@jrconlin - makes sense to me. We can come back later to try and address panics etc if/when needed. Thanks for the example of the specific error; can you let those of us reviewing this PR know how to trigger that error so we can verify that it's passing along the correct info into Sentry? |
Yes, I updated the instructions above to indicate the new |
@jr can you highlight what's different in your example event than what we get from master? I'm not seeing any new tags in Sentry. I tried it locally too, here's what I get: this is from this branch, using the this is from this branch, in master using a panic: ...AFAIK there isn't a difference in the tags sent. Maybe I'm looking in the wrong place in the Sentry UI? |
??? now I'm not seeing the added tags either. |
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.
@pjenvey points out that it's possible to downcast to ApiError to avoid the problem:
Also might be worth digging into |
* set tag info using middleware, fetch tag info from request and response Issue #329
Description
Not a super fan of this. It might be better as middleware, but that's
not always defined when we make sentry error calls. Passes a
Tags
structure around that contains the tags that will be added to sentry and metrics calls.Testing
There is an included unit test to check default tag generation.
In addition, there is now a new test endpoint called
/__error__
that will generate a sentry error containing the ua tags. (see https://sentry.prod.mozaws.net/operations/syncstorage-dev/issues/6888305/ for sample output)When running tests, note that the following tags should be added to sentry and metric calls:
Issue(s)
Issue: #329