Skip to content

Commit 78a6609

Browse files
authored
feat(js): Document missing options for http integration (#15815)
## DESCRIBE YOUR PR Adds 3 missing options to the documentation: 1. spans - Controls whether spans are created for outgoing HTTP requests 2. disableIncomingRequestSpans - Disables spans for incoming requests 3. sessionFlushingDelayMS - Controls session flushing interval ## 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 --> - [ ] None: Not urgent, can wait up to 1 week+ Related issue: getsentry/sentry-javascript#18490
1 parent f006c98 commit 78a6609

File tree

1 file changed

+29
-1
lines changed
  • docs/platforms/javascript/common/configuration/integrations

1 file changed

+29
-1
lines changed

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

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,24 @@ Sentry.init({
5050

5151
### `breadcrumbs`
5252

53-
_Type: `boolean`_
53+
_Type: `boolean`_ (Defaults to `true`)
5454

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

57+
### `spans`
58+
59+
_Type: `boolean`_ (Defaults to `false`)
60+
61+
If set to true, spans will be created for outgoing HTTP requests.
62+
5763
### `maxIncomingRequestBodySize`
5864

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

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

6369
Available options:
70+
6471
- 'none': No request bodies will be attached
6572
- 'small': Request bodies up to 1,000 bytes will be attached
6673
- 'medium': Request bodies up to 10,000 bytes will be attached (default)
@@ -108,6 +115,21 @@ _Type: `boolean`_ (Defaults to `true`)
108115

109116
If set to true, no spans will be captured for static assets like images, fonts, and other files.
110117

118+
### `disableIncomingRequestSpans`
119+
120+
_Type: `boolean`_
121+
122+
If set to true, no spans will be generated for incoming requests.
123+
124+
### `dropSpansForIncomingRequestStatusCodes`
125+
126+
_Type: `(number | [number, number])[]`_ (Defaults to `[[401, 404], [301, 303], [305, 399]]`)
127+
128+
Do not capture spans for incoming HTTP requests with the given status codes.
129+
By default, spans with some 3xx and 4xx status codes are ignored.
130+
Expects an array that can contain individual status codes (numbers) or ranges (2-element arrays of `[start, end]` where both start and end are inclusive).
131+
132+
For example, `[[300, 399], 404]` would ignore all 3xx status codes (300-399 inclusive) and 404 status codes.
111133

112134
### `trackIncomingRequestsAsSessions`
113135

@@ -116,6 +138,12 @@ _Type: `boolean`_ (Defaults to `true`)
116138
Determines whether the integration should create [Sessions](/product/releases/health/#sessions) for incoming requests to track the health and crash-free rate of your releases in Sentry.
117139
Read more about [Release Health](/product/releases/health/).
118140

141+
### `sessionFlushingDelayMS`
142+
143+
_Type: `number`_ (Defaults to `60000`)
144+
145+
The delay in milliseconds before sessions are flushed as a session aggregate. This controls how frequently session data is sent to Sentry.
146+
119147
### `instrumentation`
120148

121149
You can also pass some hooks through to the [underlying OpenTelemetry Instrumentation](https://www.npmjs.com/package/@opentelemetry/instrumentation-http):

0 commit comments

Comments
 (0)