getsentry / getsentry/sentry

Improve display of binary data

Open
#27,990 10 comments 1 reaction 0 assignees View on GitHub
Feature
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
1d 5h
Merged PRs (30d)
624

Description

### 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](https://user-images.githubusercontent.com/954385/128500563-a714eff6-3716-44e0-82be-31b5095dc181.png)
- curl view:
![afbeelding](https://user-images.githubusercontent.com/954385/128504457-45da6f44-80ee-48cb-8fe0-90012b031449.png)

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.