Skip to content

Commit 98e733f

Browse files
authored
Log when setting priority on a noop span (#5086)
1 parent 4b6a83a commit 98e733f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/dd-trace/src/priority_sampler.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ class PrioritySampler {
122122
const context = this._getContext(span)
123123
const root = context._trace.started[0]
124124

125-
if (!root) return // noop span
125+
if (!root) {
126+
log.error('Skipping the setPriority on noop span')
127+
return // noop span
128+
}
126129

127130
context._sampling.priority = samplingPriority
128131
context._sampling.mechanism = mechanism

0 commit comments

Comments
 (0)