We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70c37c8 commit f55a39eCopy full SHA for f55a39e
ddtrace/internal/sampling.py
@@ -267,8 +267,10 @@ def is_single_span_sampled(span):
267
268
def _set_sampling_tags(span, sampled, sample_rate, mechanism):
269
# type: (Span, bool, float, int) -> None
270
- # Set the sampling mechanism
271
- set_sampling_decision_maker(span.context, mechanism)
+ # Set the sampling mechanism once but never overwrite an existing tag
+ if not span.context._meta.get(SAMPLING_DECISION_TRACE_TAG_KEY):
272
+ set_sampling_decision_maker(span.context, mechanism)
273
+
274
# Set the sampling psr rate
275
if mechanism in (
276
SamplingMechanism.LOCAL_USER_TRACE_SAMPLING_RULE,
0 commit comments