Node SDK Request JSON body missing attributes

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?

You could add a maxValueLength parameter when initializing Sentry.

Thanks Chris… I think that could actually do the trick!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.