@@ -91,7 +91,6 @@ function _trackLCP(reportAllChanges: boolean): void {
91
91
const startTime = msToSec ( entry . startTime ) ;
92
92
__DEBUG_BUILD__ && logger . log ( '[Measurements] Adding LCP' ) ;
93
93
_measurements [ 'lcp' ] = { value : metric . value , unit : 'millisecond' } ;
94
- _measurements [ 'mark.lcp' ] = { value : timeOrigin + startTime , unit : 'second' } ;
95
94
_lcpEntry = entry as LargestContentfulPaint ;
96
95
} , reportAllChanges ) ;
97
96
}
@@ -147,7 +146,7 @@ export function addPerformanceEntries(transaction: Transaction): void {
147
146
case 'mark' :
148
147
case 'paint' :
149
148
case 'measure' : {
150
- const startTimestamp = _addMeasureSpans ( transaction , entry , startTime , duration , timeOrigin ) ;
149
+ _addMeasureSpans ( transaction , entry , startTime , duration , timeOrigin ) ;
151
150
152
151
// capture web vitals
153
152
const firstHidden = getVisibilityWatcher ( ) ;
@@ -157,12 +156,10 @@ export function addPerformanceEntries(transaction: Transaction): void {
157
156
if ( entry . name === 'first-paint' && shouldRecord ) {
158
157
__DEBUG_BUILD__ && logger . log ( '[Measurements] Adding FP' ) ;
159
158
_measurements [ 'fp' ] = { value : entry . startTime , unit : 'millisecond' } ;
160
- _measurements [ 'mark.fp' ] = { value : startTimestamp , unit : 'second' } ;
161
159
}
162
160
if ( entry . name === 'first-contentful-paint' && shouldRecord ) {
163
161
__DEBUG_BUILD__ && logger . log ( '[Measurements] Adding FCP' ) ;
164
162
_measurements [ 'fcp' ] = { value : entry . startTime , unit : 'millisecond' } ;
165
- _measurements [ 'mark.fcp' ] = { value : startTimestamp , unit : 'second' } ;
166
163
}
167
164
break ;
168
165
}
@@ -220,14 +217,18 @@ export function addPerformanceEntries(transaction: Transaction): void {
220
217
_measurements [ name ] . value = normalizedValue ;
221
218
} ) ;
222
219
223
- if ( _measurements [ 'mark.fid' ] && _measurements [ 'fid' ] ) {
220
+ const fidMark = _measurements [ 'mark.fid' ] ;
221
+ if ( fidMark && _measurements [ 'fid' ] ) {
224
222
// create span for FID
225
223
_startChild ( transaction , {
226
224
description : 'first input delay' ,
227
- endTimestamp : _measurements [ 'mark.fid' ] . value + msToSec ( _measurements [ 'fid' ] . value ) ,
225
+ endTimestamp : fidMark . value + msToSec ( _measurements [ 'fid' ] . value ) ,
228
226
op : 'web.vitals' ,
229
- startTimestamp : _measurements [ 'mark.fid' ] . value ,
227
+ startTimestamp : fidMark . value ,
230
228
} ) ;
229
+
230
+ // Delete mark.fid as we don't want it to be part of final payload
231
+ delete _measurements [ 'mark.fid' ] ;
231
232
}
232
233
233
234
// If FCP is not recorded we should not record the cls value
0 commit comments