Skip to content

Commit 25f0f3d

Browse files
committed
reorder stuff
1 parent ea212fc commit 25f0f3d

File tree

1 file changed

+42
-42
lines changed
  • docs/platforms/javascript/common/configuration

1 file changed

+42
-42
lines changed

docs/platforms/javascript/common/configuration/options.mdx

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ Sets the URL that will be used to transport captured events. This can be used to
6565

6666
</SdkOption>
6767

68-
<SdkOption name="sampleRate" type='number' defaultValue='1.0'>
69-
70-
Configures the sample rate for error events, in the range of `0.0` to `1.0`. The default is `1.0`, which means that 100% of error events will be sent. If set to `0.1`, only 10% of error events will be sent. Events are picked randomly.
71-
72-
</SdkOption>
73-
7468
<SdkOption name="maxBreadcrumbs" type='number' defaultValue="100">
7569

7670
This variable controls the total amount of breadcrumbs that should be captured. You should be aware that Sentry has a [maximum payload size](https://develop.sentry.dev/sdk/data-model/envelopes/#size-limits) and any events exceeding that payload size will be dropped.
@@ -93,30 +87,6 @@ Most SDKs will attempt to auto-discover this value.
9387

9488
</SdkOption>
9589

96-
<SdkOption name="ignoreErrors" type='Array<string | RegExp>' defaultValue='[]'>
97-
98-
<Include name="platforms/configuration/options/ignore-errors.mdx" />
99-
100-
</SdkOption>
101-
102-
<SdkOption name="ignoreTransactions" type='Array<string | RegExp>' defaultValue='[]'>
103-
104-
<Include name="platforms/configuration/options/ignore-transactions.mdx" />
105-
106-
</SdkOption>
107-
108-
<SdkOption name="denyUrls" type='Array<string | RegExp>' defaultValue='[]' categorySupported={['browser']}>
109-
110-
<Include name="platforms/configuration/options/deny-urls.mdx" />
111-
112-
</SdkOption>
113-
114-
<SdkOption name="allowUrls" type='Array<string | RegExp>' defaultValue='[]' categorySupported={['browser']}>
115-
116-
<Include name="platforms/configuration/options/allow-urls.mdx" />
117-
118-
</SdkOption>
119-
12090
<PlatformSection supported={['javascript.electron']}>
12191
<SdkOption name="autoSessionTracking" type='boolean' defaultValue='true'>
12292

@@ -205,6 +175,13 @@ See <PlatformLink to="/configuration/integrations/#modifying-default-integration
205175

206176
</SdkOption>
207177

178+
<SdkOption name="beforeBreadcrumb" type='(breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => Breadcrumb | null'>
179+
180+
This function is called with a breadcrumb object before the breadcrumb is added to the scope. When nothing is returned from the function, the breadcrumb is dropped. To pass the breadcrumb through, return the first argument, which contains the breadcrumb object.
181+
The callback gets a second argument (called a "hint") which contains the original object from which the breadcrumb was created to further customize what the breadcrumb should look like.
182+
183+
</SdkOption>
184+
208185
<SdkOption name="transport" type="(transportOptions: TransportOptions) => Transport">
209186

210187
The JavaScript SDK uses a transport to send events to Sentry. On modern browsers, most transports use the browsers' fetch API to send events. Transports will drop an event if it fails to send due to a lack of connection.
@@ -283,7 +260,13 @@ If the callback is not set, or it returns `undefined`, the default naming scheme
283260
</SdkOption>
284261
</PlatformSection>
285262

286-
## Hooks
263+
## Error Monitoring Options
264+
265+
<SdkOption name="sampleRate" type='number' defaultValue='1.0'>
266+
267+
Configures the sample rate for error events, in the range of `0.0` to `1.0`. The default is `1.0`, which means that 100% of error events will be sent. If set to `0.1`, only 10% of error events will be sent. Events are picked randomly.
268+
269+
</SdkOption>
287270

288271
<SdkOption name="beforeSend" type='(event: Event, hint: EventHint) => Event | null'>
289272

@@ -293,25 +276,21 @@ By the time `beforeSend` is executed, all scope data has already been applied to
293276

294277
</SdkOption>
295278

296-
<SdkOption name="beforeSendTransaction" type='(event: TransactionEvent, hint: EventHint) => TransactionEvent | null'>
279+
<SdkOption name="ignoreErrors" type='Array<string | RegExp>' defaultValue='[]'>
297280

298-
This function is called with a transaction event object, and can return a modified transaction event object, or `null` to skip reporting the event. This can be used, for instance, for manual PII stripping before sending.
281+
<Include name="platforms/configuration/options/ignore-errors.mdx" />
299282

300283
</SdkOption>
301284

302-
<SdkOption name="beforeSendSpan" type='(span: SpanJSON) => SpanJSON | null'>
303-
304-
<Include name="platforms/configuration/options/warn-before-send-span.mdx" />
285+
<SdkOption name="denyUrls" type='Array<string | RegExp>' defaultValue='[]' categorySupported={['browser']}>
305286

306-
This function is called with a serialized span object, and can return a modified span object, or `null` to skip sending the span. This might be useful for manually stripping PII from spans or to remove individual spans from the span tree.
307-
This function is only called for child spans of the root span. If you want to modify or drop the root span, including all of its child spans, use [`beforeSendTransaction`](#beforeSendTransaction) instead.
287+
<Include name="platforms/configuration/options/deny-urls.mdx" />
308288

309289
</SdkOption>
310290

311-
<SdkOption name="beforeBreadcrumb" type='(breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => Breadcrumb | null'>
291+
<SdkOption name="allowUrls" type='Array<string | RegExp>' defaultValue='[]' categorySupported={['browser']}>
312292

313-
This function is called with a breadcrumb object before the breadcrumb is added to the scope. When nothing is returned from the function, the breadcrumb is dropped. To pass the breadcrumb through, return the first argument, which contains the breadcrumb object.
314-
The callback gets a second argument (called a "hint") which contains the original object from which the breadcrumb was created to further customize what the breadcrumb should look like.
293+
<Include name="platforms/configuration/options/allow-urls.mdx" />
315294

316295
</SdkOption>
317296

@@ -362,7 +341,28 @@ If you want to disable trace propagation, you can set this option to `[]`.
362341

363342
<PlatformCategorySection supported={['browser']}>
364343

365-
## Replay Options
344+
<SdkOption name="beforeSendTransaction" type='(event: TransactionEvent, hint: EventHint) => TransactionEvent | null'>
345+
346+
This function is called with a transaction event object, and can return a modified transaction event object, or `null` to skip reporting the event. This can be used, for instance, for manual PII stripping before sending.
347+
348+
</SdkOption>
349+
350+
<SdkOption name="beforeSendSpan" type='(span: SpanJSON) => SpanJSON | null'>
351+
352+
<Include name="platforms/configuration/options/warn-before-send-span.mdx" />
353+
354+
This function is called with a serialized span object, and can return a modified span object, or `null` to skip sending the span. This might be useful for manually stripping PII from spans or to remove individual spans from the span tree.
355+
This function is only called for child spans of the root span. If you want to modify or drop the root span, including all of its child spans, use [`beforeSendTransaction`](#beforeSendTransaction) instead.
356+
357+
</SdkOption>
358+
359+
<SdkOption name="ignoreTransactions" type='Array<string | RegExp>' defaultValue='[]'>
360+
361+
<Include name="platforms/configuration/options/ignore-transactions.mdx" />
362+
363+
</SdkOption>
364+
365+
## Session Replay Options
366366

367367
<SdkOption name="replaysSessionSampleRate" type='number' categorySupported={['browser']}>
368368

0 commit comments

Comments
 (0)