Skip to content

Commit 1dd2e9a

Browse files
committed
docs(node): Add docs for maxIncomingRequestBodySize and ignoreIncomingRequestBody
1 parent 70535cf commit 1dd2e9a

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 outgoing 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 outgoing 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)