Skip to content

Add internal telemetry configuration sampling rate#1310

Merged
fuzzybinary merged 1 commit into
developfrom
jward/configuration-telemetry-property
Mar 2, 2023
Merged

Add internal telemetry configuration sampling rate#1310
fuzzybinary merged 1 commit into
developfrom
jward/configuration-telemetry-property

Conversation

@fuzzybinary

Copy link
Copy Markdown
Member

What does this PR do?

Add a property that can be supplied through additionalConfiguration which sets the extra sample rate for configuration telemetry. This serves as a way for the cross platform SDKs to modify whether telemetry gets sent in order to test our own telemetry logic.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@fuzzybinary
fuzzybinary requested a review from a team as a code owner March 1, 2023 21:30
@codecov-commenter

codecov-commenter commented Mar 2, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1310 (7d410a7) into develop (89d411f) will decrease coverage by 0.03%.
The diff coverage is 84.62%.

@@             Coverage Diff             @@
##           develop    #1310      +/-   ##
===========================================
- Coverage    82.01%   81.98%   -0.03%     
===========================================
  Files          362      362              
  Lines        12857    12868      +11     
  Branches      2156     2159       +3     
===========================================
+ Hits         10544    10549       +5     
- Misses        1661     1665       +4     
- Partials       652      654       +2     
Impacted Files Coverage Δ
...oid/src/main/kotlin/com/datadog/android/Datadog.kt 77.36% <ø> (ø)
.../kotlin/com/datadog/android/v2/core/DatadogCore.kt 84.23% <60.00%> (-0.51%) ⬇️
...atadog/android/core/configuration/Configuration.kt 98.14% <100.00%> (+0.01%) ⬆️
.../main/kotlin/com/datadog/android/rum/RumMonitor.kt 79.63% <100.00%> (+0.78%) ⬆️
...lin/com/datadog/android/rum/internal/RumFeature.kt 92.14% <100.00%> (+0.11%) ⬆️
...ndroid/telemetry/internal/TelemetryEventHandler.kt 71.88% <100.00%> (-1.56%) ⬇️
...android/log/internal/logger/TelemetryLogHandler.kt 85.71% <0.00%> (-14.29%) ⬇️
...g/internal/domain/event/DdSpanToSpanEventMapper.kt 95.83% <0.00%> (-4.17%) ⬇️
...in/com/datadog/android/log/internal/LogsFeature.kt 86.15% <0.00%> (-0.77%) ⬇️
... and 6 more

internal val sdkCore: SdkCore,
internal val eventSampler: Sampler,
internal val configurationExtraSampler: Sampler = RateBasedSampler(20f.percent()),
internal var configurationExtraSampler: Sampler = RateBasedSampler(20f.percent()),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it doesn't need to be var it seems?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, thanks. I changed it when I thought I would take a different approach but found one that worked better.

This serves as a way for the cross platform SDKs to modify whether telemetry gets sent in order to test our own telemetry logic.
@fuzzybinary
fuzzybinary force-pushed the jward/configuration-telemetry-property branch from 7d410a7 to ad0e926 Compare March 2, 2023 15:36
@fuzzybinary
fuzzybinary merged commit 9e0479b into develop Mar 2, 2023
@fuzzybinary
fuzzybinary deleted the jward/configuration-telemetry-property branch March 2, 2023 16:09
@xgouchet xgouchet added this to the 1.18.0 milestone Dec 13, 2023
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