The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
span attachment fix
ddux2c4932fd8d8f
diff --git a/backend/app/controllers/otelcontrollers/helpers.go b/backend/app/controllers/otelcontrollers/helpers.goindex 9636ec79..f40c0b88 100644--- a/backend/app/controllers/otelcontrollers/helpers.go+++ b/backend/app/controllers/otelcontrollers/helpers.go@@ -3,6 +3,7 @@ package otelcontrollersimport ("encoding/hex""strconv"+ "strings""time""github.com/google/uuid"@@ -20,6 +21,9 @@ func otelTraceIDToUUID(traceID []byte) uuid.UUID {}func rayIDToUUID(rayID string) uuid.UUID {+ if idx := strings.IndexByte(rayID, '-'); idx != -1 {+ rayID = rayID[:idx]+ }b, err := hex.DecodeString(rayID)if err != nil || len(b) == 0 {return uuid.New()diff --git a/backend/app/controllers/otelcontrollers/trace_converter.go b/backend/app/controllers/otelcontrollers/trace_converter.goindex 00e11a4f..7ce0886e 100644--- a/backend/app/controllers/otelcontrollers/trace_converter.go+++ b/backend/app/controllers/otelcontrollers/trace_converter.go@@ -36,15 +36,17 @@ func convertTraces(projectId uuid.UUID, req *coltracepb.ExportTraceServiceRequesspanAttrs := span.AttributesallAttrs := extractAttributes(spanAttrs)- traceId := otelTraceIDToUUID(span.TraceId)- if traceId == uuid.Nil {- rayId := getStringAttribute(spanAttrs, "cloudflare.ray_id")- if rayId == "" {- rayId = getStringAttribute(resourceAttrs, "cloudflare.ray_id")- }- if rayId != "" {- traceId = rayIDToUUID(rayId)- } else {+ rayId := getStringAttribute(spanAttrs, "cloudflare.ray_id")+ if rayId == "" {+ rayId = getStringAttribute(resourceAttrs, "cloudflare.ray_id")+ }++ var traceId uuid.UUID+ if rayId != "" {+ traceId = rayIDToUUID(rayId)+ } else {+ traceId = otelTraceIDToUUID(span.TraceId)+ if traceId == uuid.Nil {traceId = uuid.New()}}