Skip to content

Conversation

@dmehala
Copy link
Collaborator

@dmehala dmehala commented Sep 28, 2023

How to test

  1. docker compose build --build-arg BRANCH=dmehala/sampling-delegation --no-cache
  2. [DD_TRACE_DELEGATE_SAMPLING=<0 or 1>] [DD_API_KEY=<API_KEY>] docker compose up
  3. Enjoy! 🥳

@pr-commenter
Copy link

pr-commenter bot commented Sep 28, 2023

Benchmarks

Benchmark execution time: 2024-01-12 13:07:37

Comparing candidate commit 9fc8f73 in PR branch dmehala/sampling-delegation with baseline commit 89a8e36 in branch main.

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

@dmehala dmehala force-pushed the dmehala/sampling-delegation branch from d9b880a to 0907717 Compare September 28, 2023 15:10
@dmehala dmehala force-pushed the dmehala/sampling-delegation branch from 0907717 to e0a5048 Compare September 28, 2023 15:15
@dgoffredo
Copy link
Contributor

dgoffredo commented Jan 10, 2024

the combination of all these boolean is used to delegate or not. May I suggest a documentation in dd-trace-cpp repository to explain/details this?

Good idea, I will add that.

I can't approve because it's a draft PR. I don't know how you want to proceed, I foresee these possibilities: [...]

I'll do (1) once I've tidied up my PR.

Thanks for the review!

- Protect `struct SamplingDelegation` with a mutex.
- Check the result of `finalize_config(config3)` in `test_tracer.cpp`.
@dgoffredo dgoffredo marked this pull request as ready for review January 11, 2024 20:09
Copy link
Contributor

@dgoffredo dgoffredo left a comment

Choose a reason for hiding this comment

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

These changes look good to me. I've merged in the recommendations from #83, and merged in main.

The merge of main was substantial, so please check whether you're ok with the current state of this PR.

@dgoffredo dgoffredo merged commit bcee9a4 into main Jan 12, 2024
@dgoffredo dgoffredo deleted the dmehala/sampling-delegation branch January 12, 2024 13:37
cataphract pushed a commit to cataphract/dd-trace-cpp that referenced this pull request Mar 28, 2024
* feat: Set integration informations

* run `make format`

---------

Co-authored-by: David Goffredo <david.goffredo@datadoghq.com>
dmehala added a commit that referenced this pull request Jun 19, 2024
This fixes a regression introduced by Sampling Delegation (#59).
When the sampling delegation header is present during the trace context
extraction, the sampling priority is discarded even if the feature is
disabled.

This change of behaviour can potentially result in
an increase of ingested spans. Additionnally, the tracer should behave
as before the introduction of this feature when it is not enabled.

Changes:
  - Sampling priority is not longer discard when
  `x-datadog-delegate-trace-sampling` is present.
  - Update sampling delegation tests.
dmehala added a commit that referenced this pull request Jun 19, 2024
This fixes a regression introduced by Sampling Delegation (#59).
When the sampling delegation header is present during the trace context
extraction, the sampling priority is discarded even if the feature is
disabled.

This change of behaviour can potentially result in
an increase of ingested spans. Additionnally, the tracer should behave
as before the introduction of this feature when it is not enabled.

Changes:
  - Sampling priority is not longer discard when
  `x-datadog-delegate-trace-sampling` is present.
  - Update sampling delegation tests.
dmehala added a commit that referenced this pull request Jun 19, 2024
This fixes a regression introduced by Sampling Delegation (#59).
When the sampling delegation header is present during the trace context
extraction, the sampling priority is discarded even if the feature is
disabled.

This change of behaviour can potentially result in
an increase of ingested spans. Additionnally, the tracer should behave
as before the introduction of this feature when it is not enabled.

Changes:
  - Sampling priority is not longer discard when
  `x-datadog-delegate-trace-sampling` is present.
  - Update sampling delegation tests.
dmehala added a commit that referenced this pull request Jun 20, 2024
This fixes a regression introduced by Sampling Delegation (#59).
When the sampling delegation header is present during the trace context
extraction, the sampling priority is discarded even if the feature is
disabled.

This change of behaviour can potentially result in
an increase of ingested spans. Additionally, the tracer should behave
as before the introduction of this feature when it is not enabled.

Changes:
  - Sampling priority is not longer discard when`x-datadog-delegate-trace-sampling` is present.
  - Update sampling delegation tests.
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.

3 participants