@@ -9,7 +9,6 @@ import { msToSec } from '../utils';
9
9
import { getCLS , LayoutShift } from './web-vitals/getCLS' ;
10
10
import { getFID } from './web-vitals/getFID' ;
11
11
import { getLCP , LargestContentfulPaint } from './web-vitals/getLCP' ;
12
- import { getUpdatedCLS } from './web-vitals/getUpdatedCLS' ;
13
12
import { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher' ;
14
13
import { NavigatorDeviceMemory , NavigatorNetworkInformation } from './web-vitals/types' ;
15
14
@@ -22,7 +21,6 @@ export class MetricsInstrumentation {
22
21
private _performanceCursor : number = 0 ;
23
22
private _lcpEntry : LargestContentfulPaint | undefined ;
24
23
private _clsEntry : LayoutShift | undefined ;
25
- private _updatedClsEntry : LayoutShift | undefined ;
26
24
27
25
public constructor ( ) {
28
26
if ( ! isNodeEnv ( ) && global ?. performance ) {
@@ -189,10 +187,10 @@ export class MetricsInstrumentation {
189
187
} ) ;
190
188
}
191
189
192
- // If FCP is not recorded we should not record the updated cls value
190
+ // If FCP is not recorded we should not record the cls value
193
191
// according to the new definition of CLS.
194
192
if ( ! ( 'fcp' in this . _measurements ) ) {
195
- delete this . _measurements [ 'updated- cls' ] ;
193
+ delete this . _measurements . cls ;
196
194
}
197
195
198
196
transaction . setMeasurements ( this . _measurements ) ;
@@ -229,17 +227,13 @@ export class MetricsInstrumentation {
229
227
transaction . setTag ( `cls.source.${ index + 1 } ` , htmlTreeAsString ( source . node ) ) ,
230
228
) ;
231
229
}
232
-
233
- if ( this . _updatedClsEntry && this . _updatedClsEntry . sources ) {
234
- logger . log ( '[Measurements] Adding Updated CLS Data' ) ;
235
- this . _updatedClsEntry . sources . forEach ( ( source , index ) =>
236
- transaction . setTag ( `updated-cls.source.${ index + 1 } ` , htmlTreeAsString ( source . node ) ) ,
237
- ) ;
238
- }
239
230
}
240
231
241
232
/** Starts tracking the Cumulative Layout Shift on the current page. */
242
233
private _trackCLS ( ) : void {
234
+ // See:
235
+ // https://web.dev/evolving-cls/
236
+ // https://web.dev/cls-web-tooling/
243
237
getCLS ( metric => {
244
238
const entry = metric . entries . pop ( ) ;
245
239
if ( ! entry ) {
@@ -250,20 +244,6 @@ export class MetricsInstrumentation {
250
244
this . _measurements [ 'cls' ] = { value : metric . value } ;
251
245
this . _clsEntry = entry as LayoutShift ;
252
246
} ) ;
253
-
254
- // See:
255
- // https://web.dev/evolving-cls/
256
- // https://web.dev/cls-web-tooling/
257
- getUpdatedCLS ( metric => {
258
- const entry = metric . entries . pop ( ) ;
259
- if ( ! entry ) {
260
- return ;
261
- }
262
-
263
- logger . log ( '[Measurements] Adding Updated CLS' ) ;
264
- this . _measurements [ 'updated-cls' ] = { value : metric . value } ;
265
- this . _updatedClsEntry = entry as LayoutShift ;
266
- } ) ;
267
247
}
268
248
269
249
/**
0 commit comments