Improve display of binary data
Problem Statement
The display of a HTTP requests body data is not very useful when that body data is a binary format not understood by Sentry.
- Formatted view:
- curl view:
For reference, this is produced at the following locations in Sentry:
- Formatted view: https://github.com/getsentry/sentry/blob/9707fd3f98fa51d5d363cbe34b59aa51588db246/static/app/components/events/interfaces/richHttpContent/richHttpContentClippedBoxBodySection.tsx#L60
- curl view: https://github.com/getsentry/sentry/blob/3deff6bd884a66ec711925f0984590a2075129e1/static/app/components/events/interfaces/utils.tsx#L59
Solution Brainstorm
- Improve formatted view: Current one is technically correct as this is valid JSON, but could be made much more useful by having the option to encode all non-ASCII characters in their escaped form.
-
Improve curl view:
This is rather hard to use in many terminals. Encoding non-ASCII characters would definitely be desirable. Some thought would have to be given how to do this to make it fully portable, we probably should not depend on an escaping syntax of a specific shell. Perhaps using
xxdis more acceptable? - Add additional views: Perhaps a C-style escaped string, or a hexadecimal view.
Routing to @getsentry/workflow for triage. ⏲️
@untitaker @priscilawebdev Is this something that you would handle?
I believe so. Fwiw most sdks don't send binary bodies like that at all because those bodies are hard to strip pii from and in the general case they're not useful for debugging. I'd recommend adding an event attachment for that kind of stuff which also allows you to attach very large payloads.
We can do a better job here though I believe this would be low prio for us to work on ourselves.
I'd like to take a shot implementing some of this, are the solutions brainstormed by @DvdGiessen sufficient?
Hey just wanted to know if this issue is open, I would like to work on it as I am new to hactoberfest.
@mohammed-anwar404 I think it hasn't been addressed yet, I still see binary body data in Sentry.
Routing to @getsentry/product-owners-issues for triage ⏲️
Hi @@mohammed-anwar404, this has not been addressed yet and the issue is still open
Hey @DvdGiessen, this issue was opened 3 years ago. Is this still a problem you're experiencing? If we don't hear back in the next couple of weeks, we'll close this issue.
Just checked. Yes, I'm still seeing this (got one issue in my stream just a few days ago) and still think the brainstormed improvements will help alleviate this.