File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed
tracing-internal/src/browser Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ interface TracingOptions {
3434 * array, and only attach tracing headers if a match was found.
3535 *
3636 * @deprecated Use top level `tracePropagationTargets` option instead.
37+ * This option will be removed in v8.
38+ *
3739 * ```
3840 * Sentry.init({
3941 * tracePropagationTargets: ['api.site.com'],
Original file line number Diff line number Diff line change @@ -109,9 +109,7 @@ describe('Sentry client SDK', () => {
109109 it ( 'Merges a user-provided BrowserTracing integration with the automatically added one' , ( ) => {
110110 init ( {
111111 dsn : 'https://public@dsn.ingest.sentry.io/1337' ,
112- integrations : [
113- new BrowserTracing ( { tracePropagationTargets : [ 'myDomain.com' ] , startTransactionOnLocationChange : false } ) ,
114- ] ,
112+ integrations : [ new BrowserTracing ( { finalTimeout : 10 , startTransactionOnLocationChange : false } ) ] ,
115113 enableTracing : true ,
116114 } ) ;
117115
@@ -126,8 +124,7 @@ describe('Sentry client SDK', () => {
126124 expect ( browserTracing ) . toBeDefined ( ) ;
127125
128126 // 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 ) ;
131128
132129 // But we force the routing instrumentation to be ours
133130 expect ( options . routingInstrumentation ) . toEqual ( svelteKitRoutingInstrumentation ) ;
Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ export class BrowserTracing implements Integration {
248248 // This is done as it minimizes bundle size (we don't have to have undefined checks).
249249 //
250250 // 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
251252 const tracePropagationTargets = clientOptionsTracePropagationTargets || this . options . tracePropagationTargets ;
252253 if ( __DEBUG_BUILD__ && this . _hasSetTracePropagationTargets && clientOptionsTracePropagationTargets ) {
253254 logger . warn (
Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ export interface RequestInstrumentationOptions {
2727 * List of strings and/or regexes used to determine which outgoing requests will have `sentry-trace` and `baggage`
2828 * headers attached.
2929 *
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}
3134 */
3235 tracePropagationTargets : Array < string | RegExp > ;
3336
@@ -125,6 +128,7 @@ export function instrumentOutgoingRequests(_options?: Partial<RequestInstrumenta
125128 const {
126129 traceFetch,
127130 traceXHR,
131+ // eslint-disable-next-line deprecation/deprecation
128132 tracePropagationTargets,
129133 // eslint-disable-next-line deprecation/deprecation
130134 tracingOrigins,
You can’t perform that action at this time.
0 commit comments