Skip to content

Commit

Permalink
Making suggested fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
djluck committed Dec 9, 2024
1 parent 627cb87 commit 171deff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion processor/tailsamplingprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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? |
|---------------------------------|---------------------------------------------------------------------------|----------------------------|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down Expand Up @@ -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())
}
}
Expand Down

0 comments on commit 171deff

Please sign in to comment.