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-1467] Collect user data telemetry #1941

Merged
merged 19 commits into from Jan 23, 2023

Conversation

amortemousque
Copy link
Contributor

@amortemousque amortemousque commented Jan 11, 2023

Motivation

Monitor user usages to understand the user data volume and its impact on our batch strategy:

  • Measure the number of events per batch
  • Measure contexts bytes volumes per batch (global context, user context, feature flags)

Worth to review commit by commit

Changes

  • Move computeBytesCount from batch to utils
  • Count the context bytes of ContextManager
  • Count the FeatureFlagContext bytes
  • Make the Batch flush observable
  • Collect user data telemetry

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@amortemousque amortemousque changed the title ✨ Collect user data measures with telemetry ✨ Collect user data telemetry Jan 13, 2023
@amortemousque amortemousque marked this pull request as ready for review January 13, 2023 15:24
@amortemousque amortemousque requested a review from a team as a code owner January 13, 2023 15:24
@amortemousque amortemousque changed the title ✨ Collect user data telemetry ✨ [RUMF-1467] Collect user data telemetry Jan 13, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2023

Codecov Report

Merging #1941 (242b255) into main (90eee94) will increase coverage by 0.04%.
The diff coverage is 96.19%.

@@            Coverage Diff             @@
##             main    #1941      +/-   ##
==========================================
+ Coverage   93.12%   93.16%   +0.04%     
==========================================
  Files         142      144       +2     
  Lines        5407     5484      +77     
  Branches     1228     1248      +20     
==========================================
+ Hits         5035     5109      +74     
- Misses        372      375       +3     
Impacted Files Coverage Δ
packages/rum-core/src/domain/configuration.ts 93.87% <ø> (ø)
packages/rum-core/src/domain/lifeCycle.ts 100.00% <ø> (ø)
...ain/rumEventsCollection/action/actionCollection.ts 95.45% <ø> (ø)
...omain/rumEventsCollection/error/errorCollection.ts 100.00% <ø> (ø)
...rum-core/src/domain/contexts/featureFlagContext.ts 92.30% <81.81%> (-7.70%) ⬇️
packages/core/src/tools/utils.ts 81.92% <85.71%> (+0.10%) ⬆️
.../rum-core/src/domain/startCustomerDataTelemetry.ts 98.07% <98.07%> (ø)
packages/core/src/domain/telemetry/telemetry.ts 96.22% <100.00%> (+0.07%) ⬆️
packages/core/src/tools/contextManager.ts 100.00% <100.00%> (ø)
packages/core/src/transport/batch.ts 97.26% <100.00%> (+1.10%) ⬆️
... and 8 more

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

packages/core/src/tools/contextManager.ts Outdated Show resolved Hide resolved
packages/core/src/tools/contextManager.ts Outdated Show resolved Hide resolved
packages/rum-core/src/boot/rumPublicApi.ts Show resolved Hide resolved
packages/rum-core/src/boot/startRum.ts Outdated Show resolved Hide resolved
packages/rum-core/src/domain/startUserDataTelemetry.ts Outdated Show resolved Hide resolved
packages/rum-core/src/domain/startUserDataTelemetry.ts Outdated Show resolved Hide resolved
packages/rum-core/src/domain/startUserDataTelemetry.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@bcaudan bcaudan left a comment

Choose a reason for hiding this comment

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

Great!

@amortemousque amortemousque merged commit 35ec6d7 into main Jan 23, 2023
@amortemousque amortemousque deleted the aymeric/customer-data-telemetry branch January 23, 2023 08:27
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.

None yet

4 participants