Skip to content

Commit

Permalink
adding resource attributes to spans
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Sep 11, 2024
1 parent 4935bdd commit 3fa5931
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 3fa5931

Please sign in to comment.