File tree 4 files changed +10
-6
lines changed
tracing-internal/src/browser
4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ interface TracingOptions {
34
34
* array, and only attach tracing headers if a match was found.
35
35
*
36
36
* @deprecated Use top level `tracePropagationTargets` option instead.
37
+ * This option will be removed in v8.
38
+ *
37
39
* ```
38
40
* Sentry.init({
39
41
* tracePropagationTargets: ['api.site.com'],
Original file line number Diff line number Diff line change @@ -109,9 +109,7 @@ describe('Sentry client SDK', () => {
109
109
it ( 'Merges a user-provided BrowserTracing integration with the automatically added one' , ( ) => {
110
110
init ( {
111
111
dsn :
'https://[email protected] /1337' ,
112
- integrations : [
113
- new BrowserTracing ( { tracePropagationTargets : [ 'myDomain.com' ] , startTransactionOnLocationChange : false } ) ,
114
- ] ,
112
+ integrations : [ new BrowserTracing ( { finalTimeout : 10 , startTransactionOnLocationChange : false } ) ] ,
115
113
enableTracing : true ,
116
114
} ) ;
117
115
@@ -126,8 +124,7 @@ describe('Sentry client SDK', () => {
126
124
expect ( browserTracing ) . toBeDefined ( ) ;
127
125
128
126
// This shows that the user-configured options are still here
129
- expect ( options . tracePropagationTargets ) . toEqual ( [ 'myDomain.com' ] ) ;
130
- expect ( options . startTransactionOnLocationChange ) . toBe ( false ) ;
127
+ expect ( options . finalTimeout ) . toEqual ( 10 ) ;
131
128
132
129
// But we force the routing instrumentation to be ours
133
130
expect ( options . routingInstrumentation ) . toEqual ( svelteKitRoutingInstrumentation ) ;
Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ export class BrowserTracing implements Integration {
248
248
// This is done as it minimizes bundle size (we don't have to have undefined checks).
249
249
//
250
250
// If both 1 and either one of 2 or 3 are set (from above), we log out a warning.
251
+ // eslint-disable-next-line deprecation/deprecation
251
252
const tracePropagationTargets = clientOptionsTracePropagationTargets || this . options . tracePropagationTargets ;
252
253
if ( __DEBUG_BUILD__ && this . _hasSetTracePropagationTargets && clientOptionsTracePropagationTargets ) {
253
254
logger . warn (
Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ export interface RequestInstrumentationOptions {
27
27
* List of strings and/or regexes used to determine which outgoing requests will have `sentry-trace` and `baggage`
28
28
* headers attached.
29
29
*
30
- * Default: ['localhost', /^\//] {@see DEFAULT_TRACE_PROPAGATION_TARGETS}
30
+ * @deprecated Use the top-level `tracePropagationTargets` option in `Sentry.init` instead.
31
+ * This option will be removed in v8.
32
+ *
33
+ * Default: ['localhost', /^\//] @see {DEFAULT_TRACE_PROPAGATION_TARGETS}
31
34
*/
32
35
tracePropagationTargets : Array < string | RegExp > ;
33
36
@@ -125,6 +128,7 @@ export function instrumentOutgoingRequests(_options?: Partial<RequestInstrumenta
125
128
const {
126
129
traceFetch,
127
130
traceXHR,
131
+ // eslint-disable-next-line deprecation/deprecation
128
132
tracePropagationTargets,
129
133
// eslint-disable-next-line deprecation/deprecation
130
134
tracingOrigins,
You can’t perform that action at this time.
0 commit comments