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

🔉 [RUM-253] adjust heavy customer data warning when compression is enabled #2529

Merged
merged 11 commits into from
Jan 9, 2024

Conversation

BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented Dec 14, 2023

Motivation

We are currently displaying a warning in the console when a large context (global context, user, log context) or a lot of feature flag evaluations are set. This is to encourage users to keep their setup lean to avoid impacting the bandwidth too much.

In #2500 we introduced a new initialization parameter to enable intake request compression. With this option enabled, we are able to send more data without impacting the bandwidth too much. Thus, we can now adapt the limit we currently use to display that warning.

Changes

  • Factorize our customer data tracking implementation
  • Adjust the customer data byte count limit when compression is enabled.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

Use a single component used by both feature flags and context manager.
No need to test for customer data warning in every spec, move related
tests to `trackCustomerData` spec.
This allows to reuse the same customerDataTracker in the "stored context
manager" logic, so we don't show the same warning twice. It simplifies a
bit the code.
@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner December 14, 2023 16:50
Have a bigger limit when the compression is enabled. Because the
compression "status" is only known at init, we need to wait until before
showing the warning.
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/compression--adjust-customer-warning-2 branch from 6047511 to 03533c0 Compare December 14, 2023 16:54
@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (fe2f11c) 93.12% compared to head (79d76a8) 93.07%.
Report is 6 commits behind head on main.

Files Patch % Lines
...rum-core/src/domain/contexts/featureFlagContext.ts 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2529      +/-   ##
==========================================
- Coverage   93.12%   93.07%   -0.06%     
==========================================
  Files         227      227              
  Lines        6693     6710      +17     
  Branches     1466     1467       +1     
==========================================
+ Hits         6233     6245      +12     
- Misses        460      465       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BenoitZugmeyer BenoitZugmeyer changed the title 🔉 [RUM-253] adjust hevy customer data warning when compression is enabled 🔉 [RUM-253] adjust heavy customer data warning when compression is enabled Dec 14, 2023
@BenoitZugmeyer
Copy link
Member Author

/to-staging

@dd-devflow
Copy link
Contributor

dd-devflow bot commented Dec 14, 2023

🚂 Branch Integration: starting soon, merge in < 3s

Commit 03533c0c5d will soon be integrated into staging-50.

This build is going to start soon! (estimated merge in less than 3s)

you can cancel this operation by commenting your pull request with /to-staging -c!

dd-mergequeue bot added a commit that referenced this pull request Dec 14, 2023
…rning-2 into staging-50

Co-authored-by: Benoît Zugmeyer <[email protected]>
@dd-devflow
Copy link
Contributor

dd-devflow bot commented Dec 14, 2023

🚂 Branch Integration: This commit was successfully integrated

Commit 03533c0c5d has been merged into staging-50 in merge commit 2a0aaef68f.

Check out the triggered pipeline on Gitlab 🦊

@BenoitZugmeyer BenoitZugmeyer merged commit 0f7ea73 into main Jan 9, 2024
17 checks passed
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/compression--adjust-customer-warning-2 branch January 9, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants