getsentry / getsentry/sentry

Show in the UI when Sentry truncates data

Open
#68,426 16 comments 12 reactions 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

My understanding is that sentry has a limit on the amount of data it collects, so it sometimes truncates the data to make sure it doesn't exceed that limit. This is especially clear for long strings (like queries in the breadcrumbs section) with the added ellipsis at the end, but not so much for python dicts.

Here's one example of what I see when there is an error when receiving a postmark webhook (and here's the [complete object for reference](https://postmarkapp.com/developer/webhooks/open-tracking-webhook#open-webhook-data)):
![image](https://user-images.githubusercontent.com/17159441/215505974-74ea8f05-e227-4cf5-90db-11f442d6891c.png)
In the above example, I'm sure sentry has truncated the data because I can see the postmark metadata in one frame of the stack trace (we assign the metadata to a separate variable with `metadata = payload["Metadata"]` and I can see the contents of that variable)

The problem is that the dict representation doesn't tell me if sentry has truncated the data or not. So, now for each error, I need to think twice: did sentry truncate the dict data or did the client of my code not submit the key I'm expecting to find.

### Solution Brainstorm

I think a simple ellipsis at the end of each truncated dict would be a good visual indication that sentry has truncated the data.
```
{
"key1": "value1",
"key2": "value2",
...
}
```

However, I'm not sure what happens to existing data especially if sentry didn't collect before information about if variables were truncated or not.

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.