Skip to content

Commit

Permalink
Temporary fix for open-telemetry#5314
Browse files Browse the repository at this point in the history
Without this, the next set of test fails intermittently
  • Loading branch information
chancancode committed Jan 13, 2025
1 parent e7c826b commit 7213c2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export enum PerformanceTimingNames {
RESPONSE_END = 'responseEnd',
RESPONSE_START = 'responseStart',
SECURE_CONNECTION_START = 'secureConnectionStart',
START_TIME = 'startTime',
UNLOAD_EVENT_END = 'unloadEventEnd',
UNLOAD_EVENT_START = 'unloadEventStart',
}
2 changes: 1 addition & 1 deletion packages/opentelemetry-sdk-trace-web/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function addSpanNetworkEvent(
) {
perfTime = entries[performanceName];
}
const refName = refPerfName || PTN.FETCH_START;
const refName = refPerfName || PTN.START_TIME;
// Use a reference time which is the earliest possible value so that the performance timings that are earlier should not be added
// using FETCH START time in case no reference is provided
if (hasKey(entries, refName) && typeof entries[refName] === 'number') {
Expand Down

0 comments on commit 7213c2b

Please sign in to comment.