@@ -7,7 +7,7 @@ import { startIdleTransaction } from '../hubextensions';
77import { DEFAULT_FINAL_TIMEOUT , DEFAULT_IDLE_TIMEOUT } from '../idletransaction' ;
88import { extractTraceparentData } from '../utils' ;
99import { registerBackgroundTabDetection } from './backgroundtab' ;
10- import { MetricsInstrumentation } from './metrics' ;
10+ import { addPerformanceEntries , startTrackingWebVitals } from './metrics' ;
1111import {
1212 defaultRequestInstrumentationOptions ,
1313 instrumentOutgoingRequests ,
@@ -126,8 +126,6 @@ export class BrowserTracing implements Integration {
126126
127127 private _getCurrentHub ?: ( ) => Hub ;
128128
129- private readonly _metrics : MetricsInstrumentation ;
130-
131129 private readonly _emitOptionsWarning ?: boolean ;
132130
133131 public constructor ( _options ?: Partial < BrowserTracingOptions > ) {
@@ -148,7 +146,7 @@ export class BrowserTracing implements Integration {
148146 } ;
149147
150148 const { _metricOptions } = this . options ;
151- this . _metrics = new MetricsInstrumentation ( _metricOptions && _metricOptions . _reportAllChanges ) ;
149+ startTrackingWebVitals ( _metricOptions && _metricOptions . _reportAllChanges ) ;
152150 }
153151
154152 /**
@@ -235,7 +233,11 @@ export class BrowserTracing implements Integration {
235233 { location } , // for use in the tracesSampler
236234 ) ;
237235 idleTransaction . registerBeforeFinishCallback ( transaction => {
238- this . _metrics . addPerformanceEntries ( transaction ) ;
236+ addPerformanceEntries ( transaction ) ;
237+ transaction . setTag (
238+ 'sentry_reportAllChanges' ,
239+ Boolean ( this . options . _metricOptions && this . options . _metricOptions . _reportAllChanges ) ,
240+ ) ;
239241 } ) ;
240242
241243 return idleTransaction as Transaction ;
0 commit comments