Skip to content

Commit 0fa7434

Browse files
committed
Merge branch 'rlamb/go-event-sampling-1' into rlamb/go-event-sampling-2
2 parents 71352e7 + 3358687 commit 0fa7434

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

go/internal/otel/custom_sampler.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,21 @@ func matchAttributeValue(v attribute.Value, matchValue interface{}) bool {
393393
}
394394
}
395395
return true
396+
case attribute.STRINGSLICE:
397+
asStringSlice, ok := matchValue.([]string)
398+
if !ok {
399+
return false
400+
}
401+
lenMatch := len(asStringSlice) == len(v.AsStringSlice())
402+
if !lenMatch {
403+
return false
404+
}
405+
for i := range asStringSlice {
406+
if asStringSlice[i] != v.AsStringSlice()[i] {
407+
return false
408+
}
409+
}
410+
return true
396411
default:
397412
return false
398413
}

0 commit comments

Comments
 (0)