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-1351] add error when reaching max events size queued for upload #1716

Merged
merged 3 commits into from
Sep 5, 2022

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Sep 1, 2022

Motivation

When reaching the queued payload size limit while transport is up, it means that the SDK generates too much or too big events that it manages to send given our current thresholds:

  • limit the number of concurrent requests to the intake -> max 32 by product
  • limit the total ongoing bytes of requests to the intake -> max 80kb by product
  • limit the size of queued requests due to throttling or failure -> max 3Mb by product

Changes

Similar to event rate limiter error, report an error to customer when reaching max events size queued for upload.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

- remove dedicated file for reportAgentError
- separate logs limitation tests from the others to avoid `limiterThreshold: 1` in regular tests
- report error only once to avoid spam from single user
- remove debug log for queue full
- only keep status info for resume log
@bcaudan bcaudan marked this pull request as ready for review September 1, 2022 16:06
@bcaudan bcaudan requested review from a team as code owners September 1, 2022 16:06
@bcaudan bcaudan force-pushed the bcaudan/report-customer-error branch from 2e77fa6 to 700530d Compare September 5, 2022 07:27
@codecov-commenter
Copy link

Codecov Report

Merging #1716 (700530d) into main (0a86332) will decrease coverage by 0.03%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main    #1716      +/-   ##
==========================================
- Coverage   90.96%   90.93%   -0.04%     
==========================================
  Files         129      128       -1     
  Lines        4914     4918       +4     
  Branches     1091     1091              
==========================================
+ Hits         4470     4472       +2     
- Misses        444      446       +2     
Impacted Files Coverage Δ
...ckages/core/src/transport/startBatchWithReplica.ts 81.81% <ø> (ø)
packages/rum-core/src/transport/startRumBatch.ts 0.00% <0.00%> (ø)
packages/rum-core/src/boot/startRum.ts 25.64% <25.00%> (-1.39%) ⬇️
packages/core/src/transport/httpRequest.ts 93.61% <50.00%> (ø)
packages/rum/src/boot/startRecording.ts 95.45% <80.00%> (-4.55%) ⬇️
packages/logs/src/boot/startLogs.ts 84.84% <83.33%> (-2.25%) ⬇️
...ckages/core/src/transport/sendWithRetryStrategy.ts 100.00% <100.00%> (+1.16%) ⬆️
packages/logs/src/domain/assembly.ts 100.00% <100.00%> (ø)
packages/logs/src/transport/startLogsBatch.ts 100.00% <100.00%> (ø)
packages/rum-core/src/domain/assembly.ts 100.00% <100.00%> (ø)
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bcaudan bcaudan merged commit 4bf94c7 into main Sep 5, 2022
@bcaudan bcaudan deleted the bcaudan/report-customer-error branch September 5, 2022 08:19
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