Skip to content

Commit 2c085a1

Browse files
committed
more
1 parent 5ed4026 commit 2c085a1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/transaction/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,12 @@ function applySamplingStrategy({ transaction, tracestate, sampler, samplerType }
10791079
// TODO: Make these their own samplers?
10801080
switch (samplerType) {
10811081
case 'default': {
1082+
// This case is if we're coming from the deprecated newrelic header logic
1083+
// where we don't want to override the sampled and priority values
1084+
if (!tracestate) {
1085+
return
1086+
}
1087+
10821088
transaction.sampled = tracestate?.intrinsics ? tracestate.isSampled : null
10831089
transaction.priority = tracestate?.intrinsics ? tracestate.priority : null
10841090
break

0 commit comments

Comments
 (0)