@@ -19,15 +19,15 @@ export interface RequestInstrumentationOptions {
19
19
* Use `shouldCreateSpanForRequest` to control span creation and `tracePropagationTargets` to control
20
20
* trace header attachment.
21
21
*/
22
- tracingOrigins ? : Array < string | RegExp > ;
22
+ tracingOrigins : Array < string | RegExp > ;
23
23
24
24
/**
25
25
* List of strings and/or regexes used to determine which outgoing requests will have `sentry-trace` and `baggage`
26
26
* headers attached.
27
27
*
28
28
* Default: ['localhost', /^\//] {@see DEFAULT_TRACE_PROPAGATION_TARGETS}
29
29
*/
30
- tracePropagationTargets ? : Array < string | RegExp > ;
30
+ tracePropagationTargets : Array < string | RegExp > ;
31
31
32
32
/**
33
33
* Flag to disable patching all together for fetch requests.
@@ -105,13 +105,17 @@ type PolymorphicRequestHeaders =
105
105
export const defaultRequestInstrumentationOptions : RequestInstrumentationOptions = {
106
106
traceFetch : true ,
107
107
traceXHR : true ,
108
+ // TODO (v8): Remove this property
109
+ tracingOrigins : DEFAULT_TRACE_PROPAGATION_TARGETS ,
110
+ tracePropagationTargets : DEFAULT_TRACE_PROPAGATION_TARGETS ,
108
111
} ;
109
112
110
113
/** Registers span creators for xhr and fetch requests */
111
114
export function instrumentOutgoingRequests ( _options ?: Partial < RequestInstrumentationOptions > ) : void {
112
115
// eslint-disable-next-line deprecation/deprecation
113
116
const { traceFetch, traceXHR, tracingOrigins, tracePropagationTargets, shouldCreateSpanForRequest } = {
114
- ...defaultRequestInstrumentationOptions ,
117
+ traceFetch : defaultRequestInstrumentationOptions . traceFetch ,
118
+ traceXHR : defaultRequestInstrumentationOptions . traceXHR ,
115
119
..._options ,
116
120
} ;
117
121
0 commit comments