@@ -7,7 +7,7 @@ import { startIdleTransaction } from '../hubextensions';
7
7
import { DEFAULT_FINAL_TIMEOUT , DEFAULT_IDLE_TIMEOUT } from '../idletransaction' ;
8
8
import { extractTraceparentData } from '../utils' ;
9
9
import { registerBackgroundTabDetection } from './backgroundtab' ;
10
- import { MetricsInstrumentation } from './metrics' ;
10
+ import { addPerformanceEntries , startTrackingWebVitals } from './metrics' ;
11
11
import {
12
12
defaultRequestInstrumentationOptions ,
13
13
instrumentOutgoingRequests ,
@@ -126,8 +126,6 @@ export class BrowserTracing implements Integration {
126
126
127
127
private _getCurrentHub ?: ( ) => Hub ;
128
128
129
- private readonly _metrics : MetricsInstrumentation ;
130
-
131
129
private readonly _emitOptionsWarning ?: boolean ;
132
130
133
131
public constructor ( _options ?: Partial < BrowserTracingOptions > ) {
@@ -148,7 +146,7 @@ export class BrowserTracing implements Integration {
148
146
} ;
149
147
150
148
const { _metricOptions } = this . options ;
151
- this . _metrics = new MetricsInstrumentation ( _metricOptions && _metricOptions . _reportAllChanges ) ;
149
+ startTrackingWebVitals ( _metricOptions && _metricOptions . _reportAllChanges ) ;
152
150
}
153
151
154
152
/**
@@ -235,7 +233,11 @@ export class BrowserTracing implements Integration {
235
233
{ location } , // for use in the tracesSampler
236
234
) ;
237
235
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
+ ) ;
239
241
} ) ;
240
242
241
243
return idleTransaction as Transaction ;
0 commit comments