Check the actual bytesize of a Sentry JSON payload
What does this MR do and why?
Fixes #393029 (closed).
Since the bytes size of a JSON payload is different from what DeepSize calculates which is Ruby's object size, this MR changes the size validation by checking both the JSON payload size and, if that passes validation, then checks the size computed by DeepSize.
Screenshots or screen recordings
Screenshots (redacted) of failed requests only. Success requests are still working!
Failed requests |
---|
How to set up and validate locally
- Setup Error Tracking for Sentry host
- Access errors via Monitor > Error Tracking
- No errors
✅ - Tweak
RESPONSE_SIZE_LIMIT = 1.megabyte
inlib/error_tracking/sentry_client.rb
and restart background jobsgdk restart rails-background-jobs
- Observes errors to show up!
❌
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Peter Leitzen