Skip to content

Commit 195eb7a

Browse files
authored
adding resource attributes to spans (#4016)
1 parent 4935bdd commit 195eb7a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/traces/otel_converter.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ func FromOtelResourceSpans(resourceSpans []*v1.ResourceSpans) Trace {
3030
// Add attributes from the resource
3131
span.Attributes = append(span.Attributes, scopeSpans.Scope.Attributes...)
3232
}
33+
34+
// Add attributes from the resource
35+
if resource.Resource != nil {
36+
span.Attributes = append(span.Attributes, resource.Resource.Attributes...)
37+
}
3338
}
3439

3540
flattenSpans = append(flattenSpans, scopeSpans.Spans...)

0 commit comments

Comments
 (0)