Skip to content

RUMM-3194 add tracer sampling rate#1393

Merged
xgouchet merged 2 commits into
developfrom
xgouchet/RUMM-3194/add_tracer_sampling_rate
Apr 18, 2023
Merged

RUMM-3194 add tracer sampling rate#1393
xgouchet merged 2 commits into
developfrom
xgouchet/RUMM-3194/add_tracer_sampling_rate

Conversation

@xgouchet

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a sampling rate for local traces. The sampling will be applied automatically to the root span if it's not set manually on it.

@xgouchet
xgouchet requested a review from a team as a code owner April 18, 2023 10:02
* Sets the sampling rate of spans.
* @param samplingRate the sampling rate as a percentage between 0 and 100 (default is 100%)
*/
fun setSamplingRate(samplingRate: Double): Builder {

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.

we can also add FloatRange annotation for the clarity.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense indeed

@xgouchet
xgouchet force-pushed the xgouchet/RUMM-3194/add_tracer_sampling_rate branch from 9b90797 to 2edc280 Compare April 18, 2023 12:03
@codecov-commenter

codecov-commenter commented Apr 18, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1393 (2edc280) into develop (a3f9c38) will decrease coverage by 0.04%.
The diff coverage is 90.00%.

@@             Coverage Diff             @@
##           develop    #1393      +/-   ##
===========================================
- Coverage    82.00%   81.96%   -0.04%     
===========================================
  Files          363      363              
  Lines        13015    13021       +6     
  Branches      2188     2188              
===========================================
  Hits         10672    10672              
- Misses        1683     1684       +1     
- Partials       660      665       +5     
Impacted Files Coverage Δ
...og/trace/common/sampling/RateByServiceSampler.java 56.52% <66.67%> (-4.35%) ⬇️
...ava/com/datadog/trace/common/sampling/Sampler.java 28.57% <100.00%> (ø)
...otlin/com/datadog/android/tracing/AndroidTracer.kt 93.81% <100.00%> (+0.41%) ⬆️

... and 13 files with indirect coverage changes

@mariusc83 mariusc83 left a comment

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.

Nice work !

@xgouchet
xgouchet merged commit ef757a7 into develop Apr 18, 2023
@xgouchet
xgouchet deleted the xgouchet/RUMM-3194/add_tracer_sampling_rate branch April 18, 2023 14:42
@xgouchet xgouchet added this to the 1.19.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