Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddtrace/tracer: add IsTraceRoot to clients-side-stats #2821

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

knusbaum
Copy link
Contributor

@knusbaum knusbaum commented Aug 19, 2024

What does this PR do?

This PR adds the IsTraceRoot field to client stats payloads.

Motivation

In order to support adaptive sampling, we want to make this small change to the existing client stats implementation to bring it up to date with the version in the Trace Agent.

See:
DataDog/datadog-agent#23302
DataDog/datadog-agent#25374

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.

Unsure? Have a question? Request a review!

ddtrace/tracer/stats.go Show resolved Hide resolved
@pr-commenter
Copy link

pr-commenter bot commented Aug 21, 2024

Benchmarks

Benchmark execution time: 2024-08-21 16:54:45

Comparing candidate commit 2055b50 in PR branch knusbaum/is-trace-root-CSS with baseline commit e4985df in branch main.

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

scenario:BenchmarkInjectW3C-24

  • 🟩 execution_time [-147.184ns; -110.216ns] or [-3.556%; -2.663%]

@knusbaum knusbaum marked this pull request as ready for review August 21, 2024 17:19
@knusbaum knusbaum requested review from a team as code owners August 21, 2024 17:19
@dianashevchenko dianashevchenko merged commit a984d9e into main Aug 22, 2024
164 of 165 checks passed
@dianashevchenko dianashevchenko deleted the knusbaum/is-trace-root-CSS branch August 22, 2024 13:25
const (
trilean_not_set trilean = iota
trilean_true
trilean_false
Copy link
Member

@felixge felixge Aug 28, 2024

Choose a reason for hiding this comment

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

snake_case? 🙈

Not the end of the world, but I don't think we should let this creep into the code base further, cc @darccio as reviewer.

I submitted #2831 to clean up.

Copy link
Member

Choose a reason for hiding this comment

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

@felixge You are right, I didn't notice it. The trilean concept blinded me. We'll merge to improve this.

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