fix: regression in sampling delegation handling by dmehala · Pull Request #133 · DataDog/dd-trace-cpp

@dmehala

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.

pablomartinezbernardo

@dmehala dmehala deleted the dmehala/fix-sampling-delegation branch

June 20, 2024 10:15