Skip to content

Commit b9a5e56

Browse files
committed
Making suggested fixes
1 parent 849dbdf commit b9a5e56

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

processor/tailsamplingprocessor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ As a reminder, a policy voting to sample the trace does not guarantee sampling;
531531
### Tracking sampling policy
532532
To better understand _which_ sampling policy made the decision to include a trace, you can enable tracking the policy responsible for sampling a trace via the `processor.tailsamplingprocessor.recordpolicy` feature gate.
533533

534-
When this feature gate is set, this will add additional attributes on each sampled span scope:
534+
When this feature gate is set, this will add additional attributes on each sampled span:
535535

536536
| Attribute | Description | Present? |
537537
|---------------------------------|---------------------------------------------------------------------------|----------------------------|

processor/tailsamplingprocessor/internal/sampling/composite_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,7 @@ func TestCompositeEvaluatorSampled_RecordSubPolicy(t *testing.T) {
104104
expected := Sampled
105105
assert.Equal(t, expected, decision)
106106
val, ok := trace.ReceivedBatches.ResourceSpans().At(0).ScopeSpans().At(0).Scope().Attributes().Get("tailsampling.composite_policy")
107-
if !ok {
108-
assert.FailNow(t, "Did not find expected key")
109-
}
107+
assert.True(t, ok, "Did not find expected key")
110108
assert.Equal(t, "eval-2", val.AsString())
111109
}
112110

@@ -197,9 +195,7 @@ func TestCompositeEvaluatorInverseSampled_AlwaysSampled_RecordSubPolicy(t *testi
197195
expected := Sampled
198196
assert.Equal(t, expected, decision)
199197
val, ok := trace.ReceivedBatches.ResourceSpans().At(0).ScopeSpans().At(0).Scope().Attributes().Get("tailsampling.composite_policy")
200-
if !ok {
201-
assert.FailNow(t, "Did not find expected key")
202-
}
198+
assert.True(t, ok, "Did not find expected key")
203199
assert.Equal(t, "eval-2", val.AsString())
204200
}
205201
}

0 commit comments

Comments
 (0)