Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Member

@Lms24 Lms24 May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just noticed this:

image

Probably an issue on its own, so feel free to leave as-is for this PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created a PR: #13769

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks for doing this!

Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,32 @@ _Type: `boolean`_

If set to false, no breadcrumbs will be captured.

### `maxIncomingRequestBodySize`

_Type: `'none' | 'small' | 'medium' | 'always'`_ (Defaults to `'medium'`)

Controls the maximum size of incoming HTTP request bodies attached to events.

Available options:
- 'none': No request bodies will be attached
- 'small': Request bodies up to 1,000 bytes will be attached
- 'medium': Request bodies up to 10,000 bytes will be attached (default)
- 'always': Request bodies will always be attached

Note that even with the `'always'` setting, bodies exceeding 1 MB will never be attached for performance and security reasons.

### `ignoreIncomingRequestBody`

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

Allows you to ignore the request body for incoming HTTP requests to URLs where the given callback returns `true`.
This can be useful for long running requests where the body is not needed and we want to avoid capturing it.

The callback function receives two arguments:

- `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`.
- `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.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While writing the docs here and checking them with the JSDoc I am not 100% sure if the underlying JSDocs are correct 🤔

They mention the types of the outgoing request. But shouldn't this be the incoming? https://github.com/getsentry/sentry-javascript/pull/15959/files#diff-964fee03880b5de6d711130f1ad4111d04e194bc066ea1725b4e6b7c1c722a42

Copy link
Contributor

@sfanahata sfanahata May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just coming here to ask the same thing. Shouldn't it say "the full URL of the incoming request"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oof, good catch, I think this was copy pasta from ignoreOutgoingRequests. I'll quickly fix this in the JSDoc. Let's make sure we fix this in this PR as well, thanks :)


### `ignoreOutgoingRequests`

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