We use the Sentry Node SDK for our Express API and sometimes we have very large string attributes in our request’s JSON body.
For example, something like the following is sent the API:
{
"id": 1,
"attr_long": "Beginning of text ... the end of the text.",
"last_attr": [2]
}
Then an error is encountered in the API handling code and we report it to sentry. But in Sentry the “Body” is reported as:
{
"id": 1,
"attr_long": "Beginning of text ... the en..."
}
Sentry truncates the entire request and drops the last_attr
attribute from the body. It additionally truncates the value of the long string attribute, attr_long
. Truncating long values makes sense, but it is misleading to remove attributes from the body.
Is there a configuration or some other way to prevent this behavior?