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-1405] add mechanism to simulate intake issue #1757

Merged
merged 4 commits into from
Oct 6, 2022

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Oct 4, 2022

Motivation

Analyze behavior of retry strategy during intake issue

Changes

  • Introduce simulation parameters:
simulationStart?: string | undefined
simulationEnd?: string | undefined
simulationLabel?: string | undefined
  • consider request to primary as failed during simulation
  • add simulation label to events during simulation

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2022

Codecov Report

Merging #1757 (1611fc3) into main (b39504d) will decrease coverage by 0.21%.
The diff coverage is 56.81%.

@@            Coverage Diff             @@
##             main    #1757      +/-   ##
==========================================
- Coverage   91.05%   90.84%   -0.22%     
==========================================
  Files         128      129       +1     
  Lines        4997     5024      +27     
  Branches     1118     1131      +13     
==========================================
+ Hits         4550     4564      +14     
- Misses        447      460      +13     
Impacted Files Coverage Δ
packages/rum-core/src/transport/startRumBatch.ts 0.00% <0.00%> (ø)
packages/core/src/transport/httpRequest.ts 86.79% <37.50%> (-6.83%) ⬇️
packages/logs/src/domain/assembly.ts 97.29% <50.00%> (-2.71%) ⬇️
packages/rum-core/src/domain/assembly.ts 97.77% <50.00%> (-2.23%) ⬇️
...ckages/core/src/domain/configuration/simulation.ts 62.50% <62.50%> (ø)
...ckages/core/src/transport/sendWithRetryStrategy.ts 94.68% <64.28%> (-5.32%) ⬇️
...ckages/core/src/transport/startBatchWithReplica.ts 81.81% <66.66%> (ø)
...ges/core/src/domain/configuration/configuration.ts 100.00% <100.00%> (ø)
packages/core/src/domain/telemetry/telemetry.ts 95.65% <100.00%> (+0.09%) ⬆️
packages/rum/src/boot/startRecording.ts 95.45% <100.00%> (ø)
... and 1 more

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

@bcaudan bcaudan force-pushed the bcaudan/simulate-intake-issue branch from 644b699 to 29fda3d Compare October 4, 2022 14:13
@bcaudan bcaudan force-pushed the bcaudan/simulate-intake-issue branch from 29fda3d to f660581 Compare October 4, 2022 15:22
@bcaudan bcaudan marked this pull request as ready for review October 4, 2022 16:19
@bcaudan bcaudan requested review from a team as code owners October 4, 2022 16:19
@amortemousque
Copy link
Contributor

The mechanism looks good. Maybe you could add some tests to check that replica calls aren't sent when the simulation is active.

@bcaudan bcaudan merged commit 968e714 into main Oct 6, 2022
@bcaudan bcaudan deleted the bcaudan/simulate-intake-issue branch October 6, 2022 09:05
BenoitZugmeyer added a commit that referenced this pull request Dec 21, 2022
It turns out that the View `_dd.document_version` is replaced by another
unrelated version in the backend. I wanted to duplicate this field so we
can keep the original in views.

Because unknown `_dd` fields are discarded from View events by the
backend, I chose to put it in the global context, similarly to #1757
(and other before).
BenoitZugmeyer added a commit that referenced this pull request Jan 3, 2023
* 🔊 add view document_count in non-view events

This will help investigate why view event counts are often incorrect.

* 🐛 move document_version to global context

It turns out that the View `_dd.document_version` is replaced by another
unrelated version in the backend. I wanted to duplicate this field so we
can keep the original in views.

Because unknown `_dd` fields are discarded from View events by the
backend, I chose to put it in the global context, similarly to #1757
(and other before).

* 👌 put the documentVersion in view created event
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