diff --git a/processor/tailsamplingprocessor/README.md b/processor/tailsamplingprocessor/README.md index c9862552334e..84cc0a2f0e9d 100644 --- a/processor/tailsamplingprocessor/README.md +++ b/processor/tailsamplingprocessor/README.md @@ -531,7 +531,7 @@ As a reminder, a policy voting to sample the trace does not guarantee sampling; ### Tracking sampling policy 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. -When this feature gate is set, this will add additional attributes on each sampled span scope: +When this feature gate is set, this will add additional attributes on each sampled span: | Attribute | Description | Present? | |---------------------------------|---------------------------------------------------------------------------|----------------------------| diff --git a/processor/tailsamplingprocessor/internal/sampling/composite_test.go b/processor/tailsamplingprocessor/internal/sampling/composite_test.go index 562537acf555..e422f2e7290b 100644 --- a/processor/tailsamplingprocessor/internal/sampling/composite_test.go +++ b/processor/tailsamplingprocessor/internal/sampling/composite_test.go @@ -104,9 +104,7 @@ func TestCompositeEvaluatorSampled_RecordSubPolicy(t *testing.T) { expected := Sampled assert.Equal(t, expected, decision) val, ok := trace.ReceivedBatches.ResourceSpans().At(0).ScopeSpans().At(0).Scope().Attributes().Get("tailsampling.composite_policy") - if !ok { - assert.FailNow(t, "Did not find expected key") - } + assert.True(t, ok, "Did not find expected key") assert.Equal(t, "eval-2", val.AsString()) } @@ -197,9 +195,7 @@ func TestCompositeEvaluatorInverseSampled_AlwaysSampled_RecordSubPolicy(t *testi expected := Sampled assert.Equal(t, expected, decision) val, ok := trace.ReceivedBatches.ResourceSpans().At(0).ScopeSpans().At(0).Scope().Attributes().Get("tailsampling.composite_policy") - if !ok { - assert.FailNow(t, "Did not find expected key") - } + assert.True(t, ok, "Did not find expected key") assert.Equal(t, "eval-2", val.AsString()) } }