Skip to content

Commit

Permalink
fix: tempo 1.5 http trace conversion (#2941)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathnogueira committed Jul 14, 2023
1 parent 302cf12 commit 412cf96
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/traces/otel_http_converter.go
Expand Up @@ -14,7 +14,8 @@ import (

type HttpResourceSpans struct {
v1.ResourceSpans
ScopeSpans []*httpScopeSpans `json:"scopeSpans"`
ScopeSpans []*httpScopeSpans `json:"scopeSpans"`
InstrumentationLibrarySpans []*httpScopeSpans `json:"instrumentationLibrarySpans"`
}

type httpScopeSpans struct {
Expand Down Expand Up @@ -55,6 +56,10 @@ func FromHttpOtelResourceSpans(resourceSpans []*HttpResourceSpans) model.Trace {
for _, scopeSpans := range resource.ScopeSpans {
flattenSpans = append(flattenSpans, scopeSpans.Spans...)
}

for _, librarySpans := range resource.InstrumentationLibrarySpans {
flattenSpans = append(flattenSpans, librarySpans.Spans...)
}
}

traceID := ""
Expand Down

0 comments on commit 412cf96

Please sign in to comment.