Closed
Description
Component(s)
pkg/pdatatest
Is your feature request related to a problem? Please describe.
We compare spans which have unique attribute values (such as UUIDs). This creates issues when comparing two sets of spans.
Describe the solution you'd like
We want to ignore a specific span attribute value during comparison.
Describe alternatives you've considered
We use this code for now:
func ignoreSpanAttribute(attributeName string, traces ptrace.Traces) {
for i := 0; i < traces.ResourceSpans().Len(); i++ {
rs := traces.ResourceSpans().At(i)
for j := 0; j < rs.ScopeSpans().Len(); j++ {
ss := rs.ScopeSpans().At(j)
for k := 0; k < ss.Spans().Len(); k++ {
span := ss.Spans().At(k)
if _, ok := span.Attributes().Get(attributeName); ok {
span.Attributes().PutStr(attributeName, "*")
}
}
}
}
}
Additional context
No response