sentry icon indicating copy to clipboard operation
sentry copied to clipboard

Improve display of binary data

Open DvdGiessen opened this issue 4 years ago • 6 comments

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: afbeelding
  • curl view: afbeelding

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 xxd is more acceptable?
  • Add additional views: Perhaps a C-style escaped string, or a hexadecimal view.

DvdGiessen avatar Aug 06 '21 11:08 DvdGiessen

Routing to @getsentry/workflow for triage. ⏲️

getsentry-release avatar Aug 06 '21 12:08 getsentry-release

@untitaker @priscilawebdev Is this something that you would handle?

wedamija avatar Aug 06 '21 20:08 wedamija

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.

untitaker avatar Aug 06 '21 21:08 untitaker

I'd like to take a shot implementing some of this, are the solutions brainstormed by @DvdGiessen sufficient?

MatthijsReyers avatar Apr 17 '23 13:04 MatthijsReyers

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 avatar Oct 02 '24 13:10 mohammed-anwar404

@mohammed-anwar404 I think it hasn't been addressed yet, I still see binary body data in Sentry.

DvdGiessen avatar Oct 04 '24 00:10 DvdGiessen

Routing to @getsentry/product-owners-issues for triage ⏲️

getsantry[bot] avatar Nov 12 '24 23:11 getsantry[bot]

Hi @@mohammed-anwar404, this has not been addressed yet and the issue is still open

jangjodi avatar Nov 12 '24 23:11 jangjodi

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.

gaprl avatar Aug 22 '25 21:08 gaprl

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.

DvdGiessen avatar Aug 22 '25 21:08 DvdGiessen