Skip to content

Commit

Permalink
adding resource attributes to spans (#4016)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar authored Sep 11, 2024
1 parent 4935bdd commit 195eb7a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/traces/otel_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ func FromOtelResourceSpans(resourceSpans []*v1.ResourceSpans) Trace {
// Add attributes from the resource
span.Attributes = append(span.Attributes, scopeSpans.Scope.Attributes...)
}

// Add attributes from the resource
if resource.Resource != nil {
span.Attributes = append(span.Attributes, resource.Resource.Attributes...)
}
}

flattenSpans = append(flattenSpans, scopeSpans.Spans...)
Expand Down

0 comments on commit 195eb7a

Please sign in to comment.