Skip to content

Commit eec8899

Browse files
Lms24andreiborza
andauthored
feat(node): Add documentation for request param in httpIntegration callbacks (#10735)
Add documentation for the new `request` parameter passed as a second argument to the `ignoreOutgoingRequests` and `ignoreIncomingRequests` callbacks. --------- Co-authored-by: Andrei <168741329+andreiborza@users.noreply.github.com>
1 parent 69a47de commit eec8899

File tree

1 file changed

+14
-4
lines changed
  • docs/platforms/javascript/common/configuration/integrations

1 file changed

+14
-4
lines changed

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,22 @@ If set to false, no breadcrumbs will be captured.
4545

4646
### `ignoreOutgoingRequests`
4747

48-
_Type: `(url: string) => boolean`_
48+
_Type: `(url: string, request: RequestOptions) => boolean`_
4949

50-
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.
50+
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.
51+
52+
The callback function receives two arguments:
53+
54+
- `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`.
55+
- `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.
5156

5257
### `ignoreIncomingRequests`
5358

54-
_Type: `(url: string) => boolean`_
59+
_Type: `(urlPath: string, request: IncomingMessage) => boolean`_
60+
61+
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.
62+
63+
The callback function receives two arguments:
5564

56-
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.
65+
- `urlPath`: The URL path of the incoming request, including the query string if available. For example: `/users?name=John`.
66+
- `request`: An object of type `IncomingMessage` containing the incoming request. You can use this to filter on properties like the request method or headers.

0 commit comments

Comments
 (0)