diff --git a/input/otlp/test_approved/span_jaeger_http.approved.json b/input/otlp/test_approved/span_jaeger_http.approved.json index 4685fdc3..8234517d 100644 --- a/input/otlp/test_approved/span_jaeger_http.approved.json +++ b/input/otlp/test_approved/span_jaeger_http.approved.json @@ -106,11 +106,7 @@ "language": { "name": "unknown" }, - "name": "unknown", - "target": { - "name": "foo.bar.com:80", - "type": "http" - } + "name": "unknown" }, "timestamp": { "us": 1576500418000768 @@ -151,11 +147,7 @@ "language": { "name": "unknown" }, - "name": "unknown", - "target": { - "name": "foo.bar.com:80", - "type": "http" - } + "name": "unknown" }, "timestamp": { "us": 1576500418000768 @@ -199,11 +191,7 @@ "language": { "name": "unknown" }, - "name": "unknown", - "target": { - "name": "foo.bar.com:80", - "type": "http" - } + "name": "unknown" }, "timestamp": { "us": 1576500418000768 @@ -247,11 +235,7 @@ "language": { "name": "unknown" }, - "name": "unknown", - "target": { - "name": "foo.bar.com:80", - "type": "http" - } + "name": "unknown" }, "timestamp": { "us": 1576500418000768 @@ -295,11 +279,7 @@ "language": { "name": "unknown" }, - "name": "unknown", - "target": { - "name": "foo.bar.com:80", - "type": "http" - } + "name": "unknown" }, "timestamp": { "us": 1576500418000768 @@ -340,11 +320,7 @@ "language": { "name": "unknown" }, - "name": "unknown", - "target": { - "name": "foo.bar.com:80", - "type": "http" - } + "name": "unknown" }, "timestamp": { "us": 1576500418000768 @@ -384,11 +360,7 @@ "language": { "name": "unknown" }, - "name": "unknown", - "target": { - "name": "foo.bar.com:80", - "type": "http" - } + "name": "unknown" }, "span": { "id": "0000000041414646" @@ -428,11 +400,7 @@ "language": { "name": "unknown" }, - "name": "unknown", - "target": { - "name": "foo.bar.com:80", - "type": "http" - } + "name": "unknown" }, "span": { "id": "0000000041414646" @@ -471,11 +439,7 @@ "language": { "name": "unknown" }, - "name": "unknown", - "target": { - "name": "foo.bar.com:80", - "type": "http" - } + "name": "unknown" }, "span": { "id": "0000000041414646" diff --git a/input/otlp/traces.go b/input/otlp/traces.go index 23101a15..c36a9fdc 100644 --- a/input/otlp/traces.go +++ b/input/otlp/traces.go @@ -1074,6 +1074,13 @@ func (c *Consumer) convertSpanEvent( event.Transaction = nil // populate fields as required from parent event.Span = nil // populate fields as required from parent event.ParentId = "" // populate fields as required from parent + + // Remove unnecessary fields from span event + if event.Service != nil { + event.Service.Target = nil + event.Service.Origin = nil + } + event.Timestamp = modelpb.FromTime(spanEvent.Timestamp().AsTime().Add(timeDelta)) isJaeger := strings.HasPrefix(parent.Agent.Name, "Jaeger")