Skip to content

Commit 5159d02

Browse files
Alex KrawiecAlex Krawiec
authored andcommitted
Refactor sample rates page to be more specific
1 parent f9ddc93 commit 5159d02

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Sample Rates
3+
sidebar_order: 11
4+
description: "Adding Sentry to your app gives you a great deal of very valuable information about errors and performance you wouldn't otherwise get. And lots of information is good -- as long as it's the right information, at a reasonable volume."
5+
---
6+
7+
<Note>
8+
Some of the options below are not available in every SDK; check out platform-specific docs for more info.
9+
</Note>
10+
11+
12+
13+
- **tracesSampleRate** - A number between 0 and 1, controlling the percentage chance a given transaction will be sent to Sentry. (0 represents 0% while 1 represents 100%.) Applies equally to all transactions created in the app. Either this or `tracesSampler` must be defined to enable tracing.
14+
15+
- **tracesSampler** - A function responsible for determining the percentage chance a given transaction will be sent to Sentry. It will automatically be passed information about the transaction and the context in which it's being created, and must return a number between 0 (0% chance of being sent) and 1 (100% chance of being sent). Can also be used for filtering transactions, by returning 0 for those that are unwanted. Either this or `tracesSampleRate` must be defined to enable tracing.
16+
17+
- **replaysSessionSampleRate** - The sample rate for replays that begin recording immediately and last the entirety of the user's session. 1.0 collects all replays, and 0 collects none.
18+
19+
- **replaysOnErrorSampleRate** - The sample rate for replays that are recorded when an error happens. This type of replay will record up to a minute of events prior to the error and continue recording until the session ends. 1.0 captures all sessions with an error, and 0 captures none.
20+
21+
- **SampleRate** - 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.

0 commit comments

Comments
 (0)