Skip to content

Commit

Permalink
[chore] preallocate slices (open-telemetry#24957)
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme authored Aug 9, 2023
1 parent 02d6ae1 commit 68c4e18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions processor/redactionprocessor/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestRedactSummaryDebug(t *testing.T) {
outTraces := runTest(t, allowed, redacted, masked, ignored, config)

attr := outTraces.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).Attributes()
var deleted []string
deleted := make([]string, 0, len(redacted))
for k := range redacted {
_, ok := attr.Get(k)
assert.False(t, ok)
Expand Down Expand Up @@ -188,7 +188,7 @@ func TestRedactSummaryInfo(t *testing.T) {
outTraces := runTest(t, allowed, redacted, masked, ignored, config)

attr := outTraces.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).Attributes()
var deleted []string
deleted := make([]string, 0, len(redacted))
for k := range redacted {
_, ok := attr.Get(k)
assert.False(t, ok)
Expand Down Expand Up @@ -299,7 +299,7 @@ func TestMultipleBlockValues(t *testing.T) {
outTraces := runTest(t, allowed, redacted, masked, nil, config)

attr := outTraces.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).Attributes()
var deleted []string
deleted := make([]string, 0, len(redacted))
for k := range redacted {
_, ok := attr.Get(k)
assert.False(t, ok)
Expand Down

0 comments on commit 68c4e18

Please sign in to comment.