@@ -12,45 +12,79 @@ 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
+ *
18
+ * @default false
16
19
*/
17
20
debug ?: boolean ;
18
21
19
22
/**
20
- * Specifies whether this SDK should send events to Sentry.
21
- * Defaults to true.
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
+ *
27
+ * @default true
22
28
*/
23
29
enabled ?: boolean ;
24
30
25
- /** Attaches stacktraces to pure capture message / log integrations */
31
+ /**
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
+ *
37
+ * @default false
38
+ */
26
39
attachStacktrace ?: boolean ;
27
40
28
41
/**
29
- * 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
+ *
45
+ * @default true
30
46
*/
31
47
sendClientReports ?: boolean ;
32
48
33
49
/**
34
- * The Dsn used to connect to Sentry and identify the project. If omitted, the
35
- * 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
36
53
*/
37
54
dsn ?: string ;
38
55
39
56
/**
40
- * The release identifier used when uploading respective source maps. Specify
41
- * this value to allow Sentry to resolve the correct source maps when
42
- * 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
43
63
*/
44
64
release ?: string ;
45
65
46
- /** The current environment of your application (e.g. "production"). */
66
+ /**
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
+ *
72
+ * @default "production"
73
+ */
47
74
environment ?: string ;
48
75
49
- /** 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
+ */
50
82
dist ?: string ;
51
83
52
84
/**
53
85
* List of integrations that should be installed after SDK was initialized.
86
+ *
87
+ * @default []
54
88
*/
55
89
integrations : Integration [ ] ;
56
90
@@ -61,8 +95,7 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
61
95
transport : ( transportOptions : TO ) => Transport ;
62
96
63
97
/**
64
- * A stack parser implementation
65
- * 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.
66
99
*/
67
100
stackParser : StackParser ;
68
101
@@ -75,10 +108,12 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
75
108
* Sample rate to determine trace sampling.
76
109
*
77
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
78
- * all traces)
111
+ * all traces).
79
112
*
80
113
* Tracing is enabled if either this or `tracesSampler` is defined. If both are defined, `tracesSampleRate` is
81
- * ignored.
114
+ * ignored. Set this and `tracesSampler` to `undefined` to disable tracing.
115
+ *
116
+ * @default undefined
82
117
*/
83
118
tracesSampleRate ?: number ;
84
119
@@ -97,24 +132,34 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
97
132
98
133
/**
99
134
* Initial data to populate scope.
135
+ *
136
+ * @default undefined
100
137
*/
101
138
initialScope ?: CaptureContext ;
102
139
103
140
/**
104
- * The maximum number of breadcrumbs sent with events. Defaults to 100.
141
+ * The maximum number of breadcrumbs sent with events.
105
142
* Sentry has a maximum payload size of 1MB and any events exceeding that payload size will be dropped.
143
+ *
144
+ * @default 100
106
145
*/
107
146
maxBreadcrumbs ?: number ;
108
147
109
148
/**
110
- * A global sample rate to apply to all events.
149
+ * A global sample rate to apply to all error events.
111
150
*
112
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
113
152
* all events)
153
+ *
154
+ * @default 1.0
114
155
*/
115
156
sampleRate ?: number ;
116
157
117
- /** Maximum number of chars a single value can have before it will be truncated. */
158
+ /**
159
+ * Maximum number of chars a single value can have before it will be truncated.
160
+ *
161
+ * @default 250
162
+ */
118
163
maxValueLength ?: number ;
119
164
120
165
/**
@@ -124,7 +169,8 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
124
169
* - `user`
125
170
* - `contexts`
126
171
* - `extra`
127
- * Defaults to `3`. Set to `0` to disable.
172
+ *
173
+ * @default 3
128
174
*/
129
175
normalizeDepth ?: number ;
130
176
@@ -135,26 +181,39 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
135
181
* - `user`
136
182
* - `contexts`
137
183
* - `extra`
138
- * Defaults to `1000`
184
+ *
185
+ * @default 1000
139
186
*/
140
187
normalizeMaxBreadth ?: number ;
141
188
142
189
/**
143
190
* A pattern for error messages which should not be sent to Sentry.
144
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
+ *
196
+ * @default []
145
197
*/
146
198
ignoreErrors ?: Array < string | RegExp > ;
147
199
148
200
/**
149
201
* A pattern for transaction names which should not be sent to Sentry.
150
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
+ *
207
+ * @default []
151
208
*/
152
209
ignoreTransactions ?: Array < string | RegExp > ;
153
210
154
211
/**
155
212
* A URL to an envelope tunnel endpoint. An envelope tunnel is an HTTP endpoint
156
213
* that accepts Sentry envelopes for forwarding. This can be used to force data
157
214
* through a custom server independent of the type of data.
215
+ *
216
+ * @default undefined
158
217
*/
159
218
tunnel ?: string ;
160
219
@@ -163,7 +222,7 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
163
222
* Note that this only applies to data that the SDK is sending by default
164
223
* but not data that was explicitly set (e.g. by calling `Sentry.setUser()`).
165
224
*
166
- * Defaults to ` false`.
225
+ * @default false
167
226
*
168
227
* NOTE: This option currently controls only a few data points in a selected
169
228
* set of SDKs. The goal for this option is to eventually control all sensitive
@@ -176,6 +235,8 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
176
235
/**
177
236
* Set of metadata about the SDK that can be internally used to enhance envelopes and events,
178
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.
179
240
*/
180
241
_metadata ?: SdkMetadata ;
181
242
@@ -186,7 +247,9 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
186
247
// eslint-disable-next-line @typescript-eslint/no-explicit-any
187
248
[ key : string ] : any ;
188
249
/**
189
- * If logs support should be enabled. Defaults to false.
250
+ * If logs support should be enabled.
251
+ *
252
+ * @default false
190
253
*/
191
254
enableLogs ?: boolean ;
192
255
/**
@@ -196,6 +259,8 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
196
259
* Note that you must return a valid log from this callback. If you do not wish to modify the log, simply return
197
260
* it at the end. Returning `null` will cause the log to be dropped.
198
261
*
262
+ * @default undefined
263
+ *
199
264
* @param log The log generated by the SDK.
200
265
* @returns A new log that will be sent | null.
201
266
*/
@@ -207,7 +272,10 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
207
272
* This is the opposite of {@link Options.denyUrls}.
208
273
* By default, all errors will be sent.
209
274
*
210
- * 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
+ *
278
+ * @default []
211
279
*/
212
280
allowUrls ?: Array < string | RegExp > ;
213
281
@@ -216,7 +284,10 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
216
284
* To allow certain errors instead, use {@link Options.allowUrls}.
217
285
* By default, all errors will be sent.
218
286
*
219
- * 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
+ *
290
+ * @default []
220
291
*/
221
292
denyUrls ?: Array < string | RegExp > ;
222
293
@@ -253,7 +324,7 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
253
324
* Function to compute tracing sample rate dynamically and filter unwanted traces.
254
325
*
255
326
* Tracing is enabled if either this or `tracesSampleRate` is defined. If both are defined, `tracesSampleRate` is
256
- * ignored.
327
+ * ignored. Set this and `tracesSampleRate` to `undefined` to disable tracing.
257
328
*
258
329
* Will automatically be passed a context object of default and optional custom data.
259
330
*
0 commit comments