Skip to content
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,22 @@ If set to false, no breadcrumbs will be captured.

### `ignoreOutgoingRequests`

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

Allows you to define a method to filter out outgoing requests based on the URL. If the method returns `true`, the request will be ignored.
Allows you to define a method to filter out outgoing requests based on the URL. If the method returns `true`, no spans or breadcrumbs will be captured for the outgoing request.

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.

### `ignoreIncomingRequests`

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

Allows you to define a method to filter out incoming requests based on the URL. If the method returns `true`, no span or transaction will be captured for the incoming request.

The callback function receives two arguments:

Allows you to define a method to filter out incoming requests based on the URL. If the method returns `true`, the request will be ignored.
- `urlPath`: The URL path of the incoming request, including the query string if available. For example: `/users?name=John`.
- `request`: An object of type `IncomingMessage` containing the incoming request. You can use this to filter on properties like the request method or headers.