Skip to content
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

[RUMF-976] add info to monitor failing xhr fallback #1035

Merged
merged 4 commits into from
Sep 10, 2021

Conversation

amortemousque
Copy link
Collaborator

Motivation

The browser SDK uses sendBeacon() when available and the size < (16KB for rum, 60ko for replay). If not, it falls back to XMLHttpRequest. In some cases the XHR requests fail. This PR adds some information in the internal monitoring to better understand the reasons of this issue.

Changes

  • Add flush reason
  • Increase response text length

Testing

Unit, Locally

I have gone over the contributing documentation.

@amortemousque amortemousque requested a review from a team as a code owner September 7, 2021 12:54
@amortemousque amortemousque changed the title [RUMF-976] add info on monitor failing xhr fallback [RUMF-976] add info to monitor failing xhr fallback Sep 7, 2021
@amortemousque amortemousque force-pushed the aymeric/monitor-failing-xhr-fallback branch from 5e4851e to 7108062 Compare September 7, 2021 13:21
@amortemousque amortemousque force-pushed the aymeric/monitor-failing-xhr-fallback branch from 7108062 to c906de7 Compare September 7, 2021 13:21
@@ -52,7 +52,7 @@ export class HttpRequest {
request: {
status: req.status,
ready_state: req.readyState,
response_text: req.responseText.slice(0, 64),
response_text: req.responseText.slice(0, 256),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we confident that it will be enough?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, I made it 512 to be sure. FUI the message currently cuts at "... error:", so all the rest will be the error message.

@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2021

Codecov Report

Merging #1035 (3c88c7b) into main (b6bf965) will increase coverage by 0.00%.
The diff coverage is 88.88%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1035   +/-   ##
=======================================
  Coverage   88.93%   88.93%           
=======================================
  Files          88       88           
  Lines        4166     4168    +2     
  Branches      958      959    +1     
=======================================
+ Hits         3705     3707    +2     
  Misses        461      461           
Impacted Files Coverage Δ
packages/core/src/transport/batch.ts 90.36% <71.42%> (ø)
packages/core/src/transport/httpRequest.ts 97.05% <100.00%> (ø)
packages/rum/src/boot/startRecording.ts 100.00% <100.00%> (ø)
...ckages/rum/src/domain/segmentCollection/segment.ts 97.67% <100.00%> (+0.05%) ⬆️
.../src/domain/segmentCollection/segmentCollection.ts 98.43% <100.00%> (ø)
packages/rum/src/transport/send.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b6bf965...3c88c7b. Read the comment docs.

@amortemousque amortemousque merged commit b3bae33 into main Sep 10, 2021
@bcaudan bcaudan deleted the aymeric/monitor-failing-xhr-fallback branch September 13, 2021 08:07
@bcaudan bcaudan mentioned this pull request Apr 28, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants