Skip to content

Request body truncated to first 10 keys. #1041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pbakiewicz opened this issue Mar 4, 2021 · 14 comments · Fixed by #2092
Closed

Request body truncated to first 10 keys. #1041

pbakiewicz opened this issue Mar 4, 2021 · 14 comments · Fixed by #2092
Assignees
Labels
Good first issue Good for newcomers

Comments

@pbakiewicz
Copy link

Environment

How do you use Sentry?
self-hosted/on-premise

Which SDK and version?
sdk 1.0

Steps to Reproduce

Send request with json payload consisting at least 11 keys. My request_bodies i set to "always".

Expected Result

In the reuquest_body section I except to see 11 keys.

Actual Result

I see only 10 keys, the last keys is truncated. The same if I send 20 keys. Only 10 first keys are shown which can cause huge problem in debugging.

@ahmedetefy
Copy link
Contributor

Hey @pbakiewicz ,
Thanks for raising the issue

We are aware of that and we intentionally truncate request body to avoid hitting server payload limits. Since when we hit that limit, the server drops the event.
We are trying to increase that significantly to avoid having to trim so much of the request body, will update this issue when we have a solution

@Negaihoshi
Copy link

Are there any updates?

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@jgillard
Copy link

Just chiming in to prevent this getting closed, as I'm also waiting on an improvement to this issue. Quite often a critical key can be missing when debugging (not sure if changing how the keys are chosen should be a separate bug), so increasing the number of keys sent to Sentry would be a win.

@darklow
Copy link

darklow commented Feb 23, 2022

Multiple times I haven't been able to debug properly for same reason, some of the most important variables were missing. Please allow increase this value as on self-hosted version you can have much higher server payload limits.

@BenHunt42
Copy link

👍 Definitely a problem for us too. Would appreciate a fix for this year old issue since it makes sentry partially useless -- and why pay for a service that's not providing the intended/advertised value?

@antonpirker antonpirker added this to the Data Truncation milestone Mar 21, 2022
@alexjikim
Copy link

alexjikim commented Sep 19, 2022

it would be nice to at least have an indication that the output was truncated when viewing it on sentry ui.

when strings are truncated we see "...", but for dicts (as far as im aware) there is no such indicator, which can lead to confusion when debugging.

@libcthorne
Copy link

I've just hit the same issue, some indication of truncation or a way to disable this would be hugely appreciated!

@IvarVirusiim
Copy link

Any updates? Ran into the same problem.

@ebk46
Copy link

ebk46 commented Feb 27, 2023

Are there any updates on this? It really gets in the way of debugging when the value that causes the issue isn't even present in the report. This seems to go beyond dictionary keys and arrays - it is also limiting locals to only 10.

@awbacker
Copy link

This is just a huge waste of debugging time on our end, again. It has been years now!

I notice there is time & server resources to implement very "heavy" features that I don't want, but this foundational issue sits waiting. I guess I can add expensive tracing now, and get confused in more places!

@antonpirker
Copy link
Member

Hey! We are discussing internal how to best get rid of the trimming of the event payload, without breaking existing stuff or our servers. But this could take some time.

In the mean time you could have a look at this issue, it explains how you can change the limits of data truncated: #1105

@antonpirker
Copy link
Member

Hey @pbakiewicz @Negaihoshi @jgillard @darklow @BenHunt42 @alexjikim @libcthorne @IvarVirusiim @ebk46 @awbacker

It took quite some time, but we have now released a fix for this: https://github.com/getsentry/sentry-python/releases/tag/1.23.0

If you have set request_bodies="always" [1] the body will not be trimmed whatsoever but sent as is to Sentry.
Hope this makes your lives a bit easier and sorry again for the inconveniences.

1: https://docs.sentry.io/platforms/python/configuration/options/#request-bodies

@jgillard
Copy link

Thanks for this change. Are there any downsides to settings request_bodies="always" that we should be aware of? Other than the obvious one of lots of data appearing on the issue webpage. Things like: is there an increased chance of a payload failing or getting rejected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.