Skip to content

Commit

Permalink
feat(resources): add missingresource checkpoint behind feature toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Mar 4, 2024
1 parent 59c0a09 commit a9ba59d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ function addLoadResourceTracking() {
.forEach((entry) => {
sampleRUM('loadresource', { source: entry.name, target: Math.round(entry.duration) });
});

if (window.origin === 'business.adobe.com') {
// feature flagged for now
list.getEntries()
.filter((entry) => entry.responseStatus === 404)
.forEach((entry) => {
sampleRUM('missingresource', { source: entry.name, target: entry.hostname });
});
}
});
observer.observe({ type: 'resource', buffered: true });
}
Expand Down

0 comments on commit a9ba59d

Please sign in to comment.