@@ -12,53 +12,78 @@ import type { BaseTransportOptions, Transport } from './transport';
12
12
13
13
export interface ClientOptions < TO extends BaseTransportOptions = BaseTransportOptions > {
14
14
/**
15
- * Enable debug functionality in the SDK itself
15
+ * Enable debug functionality in the SDK itself. If `debug` is set to `true` the SDK will attempt
16
+ * to print out useful debugging information about what the SDK is doing.
17
+ *
16
18
* @default false
17
19
*/
18
20
debug ?: boolean ;
19
21
20
22
/**
21
- * Specifies whether this SDK should send events to Sentry.
23
+ * Specifies whether this SDK should send events to Sentry. Setting this to `enabled: false`
24
+ * doesn't prevent all overhead from Sentry instrumentation. To disable Sentry completely,
25
+ * depending on environment, call `Sentry.init conditionally.
26
+ *
22
27
* @default true
23
28
*/
24
29
enabled ?: boolean ;
25
30
26
31
/**
27
- * Attaches stacktraces to pure capture message / log integrations
32
+ * When enabled, stack traces are automatically attached to all events captured with `Sentry.captureMessage`.
33
+ *
34
+ * Grouping in Sentry is different for events with stack traces and without. As a result, you will get
35
+ * new groups as you enable or disable this flag for certain events.
36
+ *
28
37
* @default false
29
38
*/
30
39
attachStacktrace ?: boolean ;
31
40
32
41
/**
33
- * Send SDK Client Reports. When calling `Sentry.init()`, this option defaults to `true`.
42
+ * Send SDK Client Reports, which are used to emit outcomes about events that the SDK dropped
43
+ * or failed to capture.
44
+ *
34
45
* @default true
35
46
*/
36
47
sendClientReports ?: boolean ;
37
48
38
49
/**
39
- * The Dsn used to connect to Sentry and identify the project. If omitted, the
40
- * SDK will not send any data to Sentry.
50
+ * The DSN tells the SDK where to send the events. If this is not set, the SDK will not send any events to Sentry.
51
+ *
52
+ * @default undefined
41
53
*/
42
54
dsn ?: string ;
43
55
44
56
/**
45
- * The release identifier used when uploading respective source maps. Specify
46
- * this value to allow Sentry to resolve the correct source maps when
47
- * processing events.
57
+ * Sets the release. Release names are strings, but some formats are detected by Sentry and might be
58
+ * rendered differently. Learn more about how to send release data so Sentry can tell you about
59
+ * regressions between releases and identify the potential source in the
60
+ * [releases documentation](https://docs.sentry.io/product/releases/)
61
+ *
62
+ * @default undefined
48
63
*/
49
64
release ?: string ;
50
65
51
66
/**
52
67
* The current environment of your application (e.g. "production").
68
+ *
69
+ * Environments are case-sensitive. The environment name can't contain newlines, spaces or forward slashes,
70
+ * can't be the string "None", or exceed 64 characters. You can't delete environments, but you can hide them.
71
+ *
53
72
* @default "production"
54
73
*/
55
74
environment ?: string ;
56
75
57
- /** Sets the distribution for all events */
76
+ /**
77
+ * Sets the distribution of the application. Distributions are used to disambiguate build or
78
+ * deployment variants of the same release of an application.
79
+ *
80
+ * @default undefined
81
+ */
58
82
dist ?: string ;
59
83
60
84
/**
61
85
* List of integrations that should be installed after SDK was initialized.
86
+ *
62
87
* @default []
63
88
*/
64
89
integrations : Integration [ ] ;
@@ -70,8 +95,7 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
70
95
transport : ( transportOptions : TO ) => Transport ;
71
96
72
97
/**
73
- * A stack parser implementation
74
- * By default, a stack parser is supplied for all supported platforms
98
+ * A stack parser implementation. By default, a stack parser is supplied for all supported platforms.
75
99
*/
76
100
stackParser : StackParser ;
77
101
@@ -84,10 +108,12 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
84
108
* Sample rate to determine trace sampling.
85
109
*
86
110
* 0.0 = 0% chance of a given trace being sent (send no traces) 1.0 = 100% chance of a given trace being sent (send
87
- * all traces)
111
+ * all traces).
88
112
*
89
113
* Tracing is enabled if either this or `tracesSampler` is defined. If both are defined, `tracesSampleRate` is
90
- * ignored.
114
+ * ignored. Set this and `tracesSampler` to `undefined` to disable tracing.
115
+ *
116
+ * @default undefined
91
117
*/
92
118
tracesSampleRate ?: number ;
93
119
@@ -106,27 +132,32 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
106
132
107
133
/**
108
134
* Initial data to populate scope.
135
+ *
136
+ * @default undefined
109
137
*/
110
138
initialScope ?: CaptureContext ;
111
139
112
140
/**
113
141
* The maximum number of breadcrumbs sent with events.
114
142
* Sentry has a maximum payload size of 1MB and any events exceeding that payload size will be dropped.
143
+ *
115
144
* @default 100
116
145
*/
117
146
maxBreadcrumbs ?: number ;
118
147
119
148
/**
120
- * A global sample rate to apply to all events.
149
+ * A global sample rate to apply to all error events.
121
150
*
122
151
* 0.0 = 0% chance of a given event being sent (send no events) 1.0 = 100% chance of a given event being sent (send
123
152
* all events)
153
+ *
124
154
* @default 1.0
125
155
*/
126
156
sampleRate ?: number ;
127
157
128
158
/**
129
159
* Maximum number of chars a single value can have before it will be truncated.
160
+ *
130
161
* @default 250
131
162
*/
132
163
maxValueLength ?: number ;
@@ -138,6 +169,7 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
138
169
* - `user`
139
170
* - `contexts`
140
171
* - `extra`
172
+ *
141
173
* @default 3
142
174
*/
143
175
normalizeDepth ?: number ;
@@ -149,20 +181,29 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
149
181
* - `user`
150
182
* - `contexts`
151
183
* - `extra`
184
+ *
152
185
* @default 1000
153
186
*/
154
187
normalizeMaxBreadth ?: number ;
155
188
156
189
/**
157
190
* A pattern for error messages which should not be sent to Sentry.
158
191
* By default, all errors will be sent.
192
+ *
193
+ * Behavior of the `ignoreErrors` option is controlled by the `Sentry.eventFiltersIntegration` integration. If the
194
+ * event filters integration is not installed, the `ignoreErrors` option will not have any effect.
195
+ *
159
196
* @default []
160
197
*/
161
198
ignoreErrors ?: Array < string | RegExp > ;
162
199
163
200
/**
164
201
* A pattern for transaction names which should not be sent to Sentry.
165
202
* By default, all transactions will be sent.
203
+ *
204
+ * Behavior of the `ignoreTransactions` option is controlled by the `Sentry.eventFiltersIntegration` integration.
205
+ * If the event filters integration is not installed, the `ignoreTransactions` option will not have any effect.
206
+ *
166
207
* @default []
167
208
*/
168
209
ignoreTransactions ?: Array < string | RegExp > ;
@@ -171,13 +212,16 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
171
212
* A URL to an envelope tunnel endpoint. An envelope tunnel is an HTTP endpoint
172
213
* that accepts Sentry envelopes for forwarding. This can be used to force data
173
214
* through a custom server independent of the type of data.
215
+ *
216
+ * @default undefined
174
217
*/
175
218
tunnel ?: string ;
176
219
177
220
/**
178
221
* Controls if potentially sensitive data should be sent to Sentry by default.
179
222
* Note that this only applies to data that the SDK is sending by default
180
223
* but not data that was explicitly set (e.g. by calling `Sentry.setUser()`).
224
+ *
181
225
* @default false
182
226
*
183
227
* NOTE: This option currently controls only a few data points in a selected
@@ -191,6 +235,8 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
191
235
/**
192
236
* Set of metadata about the SDK that can be internally used to enhance envelopes and events,
193
237
* and provide additional data about every request.
238
+ *
239
+ * @internal This option is not part of the public API and is subject to change at any time.
194
240
*/
195
241
_metadata ?: SdkMetadata ;
196
242
@@ -202,6 +248,7 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
202
248
[ key : string ] : any ;
203
249
/**
204
250
* If logs support should be enabled.
251
+ *
205
252
* @default false
206
253
*/
207
254
enableLogs ?: boolean ;
@@ -212,6 +259,8 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
212
259
* Note that you must return a valid log from this callback. If you do not wish to modify the log, simply return
213
260
* it at the end. Returning `null` will cause the log to be dropped.
214
261
*
262
+ * @default undefined
263
+ *
215
264
* @param log The log generated by the SDK.
216
265
* @returns A new log that will be sent | null.
217
266
*/
@@ -223,7 +272,9 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
223
272
* This is the opposite of {@link Options.denyUrls}.
224
273
* By default, all errors will be sent.
225
274
*
226
- * Requires the use of the `InboundFilters` integration.
275
+ * Behavior of the `allowUrls` option is controlled by the `Sentry.eventFiltersIntegration` integration.
276
+ * If the event filters integration is not installed, the `allowUrls` option will not have any effect.
277
+ *
227
278
* @default []
228
279
*/
229
280
allowUrls ?: Array < string | RegExp > ;
@@ -233,7 +284,9 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
233
284
* To allow certain errors instead, use {@link Options.allowUrls}.
234
285
* By default, all errors will be sent.
235
286
*
236
- * Requires the use of the `InboundFilters` integration.
287
+ * Behavior of the `denyUrls` option is controlled by the `Sentry.eventFiltersIntegration` integration.
288
+ * If the event filters integration is not installed, the `denyUrls` option will not have any effect.
289
+ *
237
290
* @default []
238
291
*/
239
292
denyUrls ?: Array < string | RegExp > ;
@@ -271,7 +324,7 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
271
324
* Function to compute tracing sample rate dynamically and filter unwanted traces.
272
325
*
273
326
* Tracing is enabled if either this or `tracesSampleRate` is defined. If both are defined, `tracesSampleRate` is
274
- * ignored.
327
+ * ignored. Set this and `tracesSampleRate` to `undefined` to disable tracing.
275
328
*
276
329
* Will automatically be passed a context object of default and optional custom data.
277
330
*
0 commit comments