Skip to content

ddtrace/tracer: added DD_TRACE_SAMPLING_RULES_FILE env var#2404

Merged
dianashevchenko merged 4 commits into
shevchenko/tag-resource-samplingfrom
shevchenko/add-trace-sampling-rules-file
Nov 30, 2023
Merged

ddtrace/tracer: added DD_TRACE_SAMPLING_RULES_FILE env var#2404
dianashevchenko merged 4 commits into
shevchenko/tag-resource-samplingfrom
shevchenko/add-trace-sampling-rules-file

Conversation

@dianashevchenko

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds support to extract trace sampling rules from the file, just like it is supported for span sampling rules .

Motivation

The sampling rule struct is gaining complexity through 3 additional fields, which makes adding sampling rules through a file easier and more comfortable

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.

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!

@dianashevchenko
dianashevchenko requested a review from a team November 30, 2023 15:13
@dianashevchenko
dianashevchenko changed the base branch from main to shevchenko/tag-resource-sampling November 30, 2023 15:14
Comment thread ddtrace/tracer/rules_sampler.go Outdated
@pr-commenter

pr-commenter Bot commented Nov 30, 2023

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2023-11-30 16:08:16

Comparing candidate commit cdc92a7 in PR branch shevchenko/add-trace-sampling-rules-file with baseline commit a6e5ba9 in branch shevchenko/tag-resource-sampling.

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

@darccio darccio 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!

@dianashevchenko
dianashevchenko merged commit 66400e5 into shevchenko/tag-resource-sampling Nov 30, 2023
@dianashevchenko
dianashevchenko deleted the shevchenko/add-trace-sampling-rules-file branch November 30, 2023 16:13
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