Skip to content

Commit

Permalink
Log when setting priority on a noop span (#5086)
Browse files Browse the repository at this point in the history
  • Loading branch information
iunanua authored Jan 9, 2025
1 parent 4b6a83a commit 98e733f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/dd-trace/src/priority_sampler.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ class PrioritySampler {
const context = this._getContext(span)
const root = context._trace.started[0]

if (!root) return // noop span
if (!root) {
log.error('Skipping the setPriority on noop span')
return // noop span
}

context._sampling.priority = samplingPriority
context._sampling.mechanism = mechanism
Expand Down

0 comments on commit 98e733f

Please sign in to comment.