-
Notifications
You must be signed in to change notification settings - Fork 1
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
Truncate the message sent to sentry to max allowable chars #806
Conversation
Oh I started investigating that issue on the sentry-go sdk repo and I think they may have actually just implemented this in v0.6.0. Lemme double check that's the case and they we can just bump their version instead of this handrolled implementation... |
hmmm nope as far as I can tell it's still silently failing :/ I think if I'm reading the getsentry/sentry-go#168 correctly, it is just ensuring that the |
LGTM! |
I'm gonna do a quick test of moving this into the |
Ok yeah I did a smol refactor and I like this way more. I tested that it still reports correctly: https://sentry.io/organizations/getlantern/issues/1633698328/?project=2222244&query=is%3Aunresolved Thanks for being patient with me 😁 😁 |
Looks great @max-b -- gonna go ahead and merge! |
Thanks! |
This attempts to address the issue described in https://github.com/getlantern/lantern-internal/issues/3620#issuecomment-616904350 where panics in the
anacrolix/torrent
library weren't getting reported to sentry.From some random testing locally, it seems as though the stack trace we're attempting to sent to sentry is just too large and is causing the reporting to fail silently 😬 😬 (I think this is "documented" in getsentry/sentry-go#169)
I chose 8k as the max number of characters from basically looking at successful sentry reports and looking at the point at which they were truncated (I think that sentry does some kind of truncation before storing on their end).
I was able to get a panic inside a goroutine in the
torrent
library to be reported after making the change:https://sentry.io/organizations/getlantern/issues/1633600374/?project=2222244