-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨[RUM-160] Collect PerformanceResourceTiming.responseStatus #2587
Conversation
/to-staging |
🚂 Branch Integration: starting soon, merge in < 8m Commit 1b4b2bf4f4 will soon be integrated into staging-05. This build is going to start soon! (estimated merge in less than 8m) Use |
🚂 Branch Integration: This commit was successfully integrated Commit 1b4b2bf4f4 has been merged into staging-05 in merge commit 1e41f28078. Check out the triggered pipeline on Gitlab 🦊 |
@@ -142,6 +141,7 @@ function processResourceEntry( | |||
id: generateUUID(), | |||
type, | |||
url: entry.name, | |||
status_code: entry.responseStatus, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to MDN, the responseStatus will be 0 for cross-origin requests, which might happen frequently.
To avoid confusing customers, it could be nice no to send the status_code if the value is 0.
/to-staging |
🚂 Branch Integration: starting soon, merge in < 9m Commit d5a483da9e will soon be integrated into staging-06. This build is going to start soon! (estimated merge in less than 9m) Use |
🚂 Branch Integration: This commit was successfully integrated Commit d5a483da9e has been merged into staging-06 in merge commit 51d8f1e10f. Check out the triggered pipeline on Gitlab 🦊 |
packages/rum-core/src/domain/resource/resourceCollection.spec.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Aymeric <aymeric.mortemousque@datadoghq.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2587 +/- ##
=======================================
Coverage 92.78% 92.78%
=======================================
Files 235 235
Lines 6789 6791 +2
Branches 1487 1488 +1
=======================================
+ Hits 6299 6301 +2
Misses 490 490 ☔ View full report in Codecov by Sentry. |
Motivation
To add a response status to resource other than xhr and fetch when available
Changes
use PerformanceResourceTiming.responseStatus in the resource events.
https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus
Testing
I have gone over the contributing documentation.