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-6850: Add "Effective Sample Rate" to telemetry events #2127

Conversation

simaoseica-dd
Copy link
Contributor

@simaoseica-dd simaoseica-dd commented Dec 3, 2024

What and why?

This PR adds a new property effectiveSampleRate to all types of telemetry events.
We want to know the actual rate applied to the events that is composed by all the sample rates, in the different layers, through which the event passes.

How?

  • Composes effectiveSampleRate with the global telemetrySampleRate for:

    • Configuration telemetry events, with "configuration telemetry sample rate" of 20%.
    • Metrics telemetry events, with "metrics telemetry sample rate" of 15%.
    • Individual metrics events, like debug and error events.
  • Logic centralized on SampleRate type alias:

    • Standard type for sample rate parameters
    • Logic for the composition of sample rates centralized in one place

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes
  • Add Objective-C interface for public APIs (see our guidelines [internal]) and run make api-surface)

@simaoseica-dd simaoseica-dd force-pushed the simaoseica/RUM-6850/add-effective-sample-rate-to-telemetry-events branch 2 times, most recently from 2ff120e to c6c64b6 Compare December 5, 2024 10:50
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Dec 5, 2024

Datadog Report

Branch report: simaoseica/RUM-6850/add-effective-sample-rate-to-telemetry-events
Commit report: 813cfcc
Test service: dd-sdk-ios

✅ 0 Failed, 3583 Passed, 0 Skipped, 2m 31.9s Total Time
🔻 Test Sessions change in coverage: 7 decreased, 5 increased, 2 no change

🔻 Code Coverage Decreases vs Default Branch (7)

This report shows up to 5 code coverage decreases.

  • test DatadogSessionReplayTests iOS 34.28% (-0.08%) - Details
  • test DatadogTraceTests tvOS 54.21% (-0.03%) - Details
  • test DatadogLogsTests iOS 47.67% (-0.03%) - Details
  • test DatadogLogsTests tvOS 47.73% (-0.03%) - Details
  • test DatadogCrashReportingTests tvOS 26.66% (-0.02%) - Details

@simaoseica-dd simaoseica-dd force-pushed the simaoseica/RUM-6850/add-effective-sample-rate-to-telemetry-events branch from c6c64b6 to 0bde0a1 Compare December 5, 2024 11:05
@simaoseica-dd simaoseica-dd marked this pull request as ready for review December 5, 2024 11:13
@simaoseica-dd simaoseica-dd requested review from a team as code owners December 5, 2024 11:13
@simaoseica-dd simaoseica-dd force-pushed the simaoseica/RUM-6850/add-effective-sample-rate-to-telemetry-events branch 3 times, most recently from e730349 to 5211116 Compare December 5, 2024 17:29
mariedm
mariedm previously approved these changes Dec 6, 2024
@simaoseica-dd simaoseica-dd force-pushed the simaoseica/RUM-6850/add-effective-sample-rate-to-telemetry-events branch from 5211116 to e625bd5 Compare December 10, 2024 10:49
@simaoseica-dd simaoseica-dd force-pushed the simaoseica/RUM-6850/add-effective-sample-rate-to-telemetry-events branch 2 times, most recently from 2466d30 to 813cfcc Compare December 10, 2024 14:13
Copy link
Member

@ncreated ncreated left a comment

Choose a reason for hiding this comment

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

🏅 🎯 Well done, LG!

@simaoseica-dd simaoseica-dd merged commit 0b6d657 into develop Dec 10, 2024
16 checks passed
@maxep maxep mentioned this pull request Dec 11, 2024
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.

3 participants