Skip to content

sampling: update formula#3423

Merged
genesor merged 2 commits into
mainfrom
ben.db/APMAPI-1263-adjust-sampling-formula
Apr 17, 2025
Merged

sampling: update formula#3423
genesor merged 2 commits into
mainfrom
ben.db/APMAPI-1263-adjust-sampling-formula

Conversation

@genesor

@genesor genesor commented Apr 14, 2025

Copy link
Copy Markdown
Member

What does this PR do?

The sampling formula has changed a bit to have an consistent one across all tracers. The change is relatively small in Go as it only require a change from < rate * math.MaxUint64 to <= rate * math.MaxUint64

Motivation

We are aiming to have consistent sampling over all tracers.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running golangci-lint run locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
  • For internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

Unsure? Have a question? Request a review!

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Apr 14, 2025

Copy link
Copy Markdown

Datadog Report

Branch report: ben.db/APMAPI-1263-adjust-sampling-formula
Commit report: db01c01
Test service: dd-trace-go

✅ 0 Failed, 4480 Passed, 65 Skipped, 3m 50.57s Total Time

@genesor
genesor force-pushed the ben.db/APMAPI-1263-adjust-sampling-formula branch from 003b7b0 to 94b515d Compare April 14, 2025 11:30
@pr-commenter

pr-commenter Bot commented Apr 14, 2025

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2025-04-14 15:54:46

Comparing candidate commit 4fe7fcb in PR branch ben.db/APMAPI-1263-adjust-sampling-formula with baseline commit b4ef47f in branch main.

Found 1 performance improvements and 0 performance regressions! Performance is the same for 54 metrics, 1 unstable metrics.

scenario:BenchmarkSetTagStringer-24

  • 🟩 execution_time [-5.779ns; -3.521ns] or [-4.053%; -2.470%]

@genesor
genesor force-pushed the ben.db/APMAPI-1263-adjust-sampling-formula branch from 94b515d to c412d5d Compare April 14, 2025 12:43
@genesor
genesor marked this pull request as ready for review April 14, 2025 13:56
@genesor
genesor requested a review from a team as a code owner April 14, 2025 13:56
@genesor genesor changed the title [WIP] sampling: update formula sampling: update formula Apr 14, 2025
Comment thread ddtrace/tracer/sampler.go
@genesor
genesor force-pushed the ben.db/APMAPI-1263-adjust-sampling-formula branch from c412d5d to 4fe7fcb Compare April 14, 2025 15:25
@genesor
genesor enabled auto-merge (squash) April 16, 2025 11:34
@genesor
genesor merged commit bd453f2 into main Apr 17, 2025
@genesor
genesor deleted the ben.db/APMAPI-1263-adjust-sampling-formula branch April 17, 2025 09:21
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.

3 participants