Skip to content

tracer: fix example and add SamplingRule function tests#2493

Merged
katiehockman merged 4 commits into
mainfrom
katie.hockman/sampling-docs
Jan 10, 2024
Merged

tracer: fix example and add SamplingRule function tests#2493
katiehockman merged 4 commits into
mainfrom
katie.hockman/sampling-docs

Conversation

@katiehockman

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Fixes example for tracer.SpanNameServiceRule (the order was flipped)
  • Fixes tests for span sampling. It appears that the env-related tests were duplicated with the intent to use SamplingRule instead, but it was never done, so the tests are identical and appear twice. This fixes that, and adds some missing tests.

Motivation

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.
  • 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 Datadog employees:

  • If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@katiehockman
katiehockman marked this pull request as ready for review January 9, 2024 19:31
@katiehockman
katiehockman requested a review from a team as a code owner January 9, 2024 19:31
@pr-commenter

pr-commenter Bot commented Jan 9, 2024

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2024-01-09 19:44:36

Comparing candidate commit 4d6d978 in PR branch katie.hockman/sampling-docs with baseline commit 249640f in branch main.

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

@katiehockman
katiehockman enabled auto-merge (squash) January 10, 2024 15:20
@katiehockman
katiehockman merged commit d47ce67 into main Jan 10, 2024
@katiehockman
katiehockman deleted the katie.hockman/sampling-docs branch January 10, 2024 15: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.

2 participants