@@ -91,7 +91,6 @@ function _trackLCP(reportAllChanges: boolean): void {
9191 const startTime = msToSec ( entry . startTime ) ;
9292 __DEBUG_BUILD__ && logger . log ( '[Measurements] Adding LCP' ) ;
9393 _measurements [ 'lcp' ] = { value : metric . value , unit : 'millisecond' } ;
94- _measurements [ 'mark.lcp' ] = { value : timeOrigin + startTime , unit : 'second' } ;
9594 _lcpEntry = entry as LargestContentfulPaint ;
9695 } , reportAllChanges ) ;
9796}
@@ -147,7 +146,7 @@ export function addPerformanceEntries(transaction: Transaction): void {
147146 case 'mark' :
148147 case 'paint' :
149148 case 'measure' : {
150- const startTimestamp = _addMeasureSpans ( transaction , entry , startTime , duration , timeOrigin ) ;
149+ _addMeasureSpans ( transaction , entry , startTime , duration , timeOrigin ) ;
151150
152151 // capture web vitals
153152 const firstHidden = getVisibilityWatcher ( ) ;
@@ -157,12 +156,10 @@ export function addPerformanceEntries(transaction: Transaction): void {
157156 if ( entry . name === 'first-paint' && shouldRecord ) {
158157 __DEBUG_BUILD__ && logger . log ( '[Measurements] Adding FP' ) ;
159158 _measurements [ 'fp' ] = { value : entry . startTime , unit : 'millisecond' } ;
160- _measurements [ 'mark.fp' ] = { value : startTimestamp , unit : 'second' } ;
161159 }
162160 if ( entry . name === 'first-contentful-paint' && shouldRecord ) {
163161 __DEBUG_BUILD__ && logger . log ( '[Measurements] Adding FCP' ) ;
164162 _measurements [ 'fcp' ] = { value : entry . startTime , unit : 'millisecond' } ;
165- _measurements [ 'mark.fcp' ] = { value : startTimestamp , unit : 'second' } ;
166163 }
167164 break ;
168165 }
@@ -220,14 +217,18 @@ export function addPerformanceEntries(transaction: Transaction): void {
220217 _measurements [ name ] . value = normalizedValue ;
221218 } ) ;
222219
223- if ( _measurements [ 'mark.fid' ] && _measurements [ 'fid' ] ) {
220+ const fidMark = _measurements [ 'mark.fid' ] ;
221+ if ( fidMark && _measurements [ 'fid' ] ) {
224222 // create span for FID
225223 _startChild ( transaction , {
226224 description : 'first input delay' ,
227- endTimestamp : _measurements [ 'mark.fid' ] . value + msToSec ( _measurements [ 'fid' ] . value ) ,
225+ endTimestamp : fidMark . value + msToSec ( _measurements [ 'fid' ] . value ) ,
228226 op : 'web.vitals' ,
229- startTimestamp : _measurements [ 'mark.fid' ] . value ,
227+ startTimestamp : fidMark . value ,
230228 } ) ;
229+
230+ // Delete mark.fid as we don't want it to be part of final payload
231+ delete _measurements [ 'mark.fid' ] ;
231232 }
232233
233234 // If FCP is not recorded we should not record the cls value
0 commit comments