Skip to content

Commit

Permalink
Integrate 76ac2e2 (#2683) from benoit/remove-redirect-estimation-logi…
Browse files Browse the repository at this point in the history
…c into staging-14

Co-authored-by: Benoît Zugmeyer <[email protected]>
  • Loading branch information
dd-mergequeue[bot] and BenoitZugmeyer authored Apr 4, 2024
2 parents dabd85f + 76ac2e2 commit d84fda5
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions packages/rum-core/src/domain/resource/resourceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,23 @@ export function toValidEntry(entry: RumPerformanceResourceTiming) {
// RumPerformanceResourceTiming, it will ignore entries from requests where timings cannot be
// collected, for example cross origin requests without a "Timing-Allow-Origin" header allowing
// it.
if (
areInOrder(
entry.startTime,
entry.fetchStart,
entry.domainLookupStart,
entry.domainLookupEnd,
entry.connectStart,
entry.connectEnd,
entry.requestStart,
entry.responseStart,
entry.responseEnd
) &&
(!hasRedirection(entry) || areInOrder(entry.startTime, entry.redirectStart, entry.redirectEnd, entry.fetchStart))
) {
const areCommonTimingsInOrder = areInOrder(
entry.startTime,
entry.fetchStart,
entry.domainLookupStart,
entry.domainLookupEnd,
entry.connectStart,
entry.connectEnd,
entry.requestStart,
entry.responseStart,
entry.responseEnd
)

const areRedirectionTimingsInOrder = hasRedirection(entry)
? areInOrder(entry.startTime, entry.redirectStart, entry.redirectEnd, entry.fetchStart)
: true

if (areCommonTimingsInOrder && areRedirectionTimingsInOrder) {
return entry
}
}
Expand Down

0 comments on commit d84fda5

Please sign in to comment.