File tree 2 files changed +11
-6
lines changed
packages/opentelemetry-instrumentation-xml-http-request
2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -230,10 +230,9 @@ export class XMLHttpRequestInstrumentation extends InstrumentationBase<
230
230
// fallback - either Observer is not available or it took longer
231
231
// then OBSERVER_WAIT_TIME_MS and observer didn't collect enough
232
232
// information
233
- resources = otperformance . getEntriesByType (
234
- // ts thinks this is the perf_hooks module, but it is the browser performance api
235
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
236
- 'resource' as any
233
+ // ts thinks this is the perf_hooks module, but it is the browser performance api
234
+ resources = ( ( otperformance as unknown ) as Performance ) . getEntriesByType (
235
+ 'resource'
237
236
) as PerformanceResourceTiming [ ] ;
238
237
}
239
238
Original file line number Diff line number Diff line change @@ -189,7 +189,10 @@ describe('xhr', () => {
189
189
} )
190
190
) ;
191
191
192
- spyEntries = sandbox . stub ( performance , 'getEntriesByType' ) ;
192
+ spyEntries = sandbox . stub (
193
+ ( performance as unknown ) as Performance ,
194
+ 'getEntriesByType'
195
+ ) ;
193
196
spyEntries . withArgs ( 'resource' ) . returns ( resources ) ;
194
197
xmlHttpRequestInstrumentation = new XMLHttpRequestInstrumentation (
195
198
config
@@ -709,7 +712,10 @@ describe('xhr', () => {
709
712
} )
710
713
) ;
711
714
712
- spyEntries = sandbox . stub ( performance , 'getEntriesByType' ) ;
715
+ spyEntries = sandbox . stub (
716
+ ( performance as unknown ) as Performance ,
717
+ 'getEntriesByType'
718
+ ) ;
713
719
spyEntries . withArgs ( 'resource' ) . returns ( resources ) ;
714
720
715
721
webTracerWithZoneProvider = new WebTracerProvider ( {
You can’t perform that action at this time.
0 commit comments