Skip to content

Commit 8df2fe1

Browse files
authored
docs(node): Add docs for maxIncomingRequestBodySize and ignoreIncomingRequestBody (#13698)
## DESCRIBE YOUR PR Documents `ignoreIncomingRequestBody `: getsentry/sentry-javascript#15959 Documents `maxIncomingRequestBodySize`: getsentry/sentry-javascript#16225 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs)
1 parent bfad3e0 commit 8df2fe1

File tree

1 file changed

+26
-0
lines changed
  • docs/platforms/javascript/common/configuration/integrations

1 file changed

+26
-0
lines changed

docs/platforms/javascript/common/configuration/integrations/http.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,32 @@ _Type: `boolean`_
5454

5555
If set to false, no breadcrumbs will be captured.
5656

57+
### `maxIncomingRequestBodySize`
58+
59+
_Type: `'none' | 'small' | 'medium' | 'always'`_ (Defaults to `'medium'`)
60+
61+
Controls the maximum size of incoming HTTP request bodies attached to events.
62+
63+
Available options:
64+
- 'none': No request bodies will be attached
65+
- 'small': Request bodies up to 1,000 bytes will be attached
66+
- 'medium': Request bodies up to 10,000 bytes will be attached (default)
67+
- 'always': Request bodies will always be attached
68+
69+
Note that even with the `'always'` setting, bodies exceeding 1 MB will never be attached for performance and security reasons.
70+
71+
### `ignoreIncomingRequestBody`
72+
73+
_Type: `(url: string, request: RequestOptions) => boolean`_
74+
75+
Allows you to ignore the request body for incoming HTTP requests to URLs where the given callback returns `true`.
76+
This can be useful for long running requests where the body is not needed and we want to avoid capturing it.
77+
78+
The callback function receives two arguments:
79+
80+
- `url`: The full URL of the incoming request, including the protocol, host, port, path and query string. For example: `https://example.com/users?name=John`.
81+
- `request`: An object of type `RequestOptions` containing the incoming request's options. You can use this to filter on properties like the request method or headers.
82+
5783
### `ignoreOutgoingRequests`
5884

5985
_Type: `(url: string, request: RequestOptions) => boolean`_

0 commit comments

Comments
 (0)