Skip to content

Commit

Permalink
Remove service.target.* and service.origin.*
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonip committed Oct 9, 2024
1 parent 4db6f73 commit 4c8b59d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 45 deletions.
54 changes: 9 additions & 45 deletions input/otlp/test_approved/span_jaeger_http.approved.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,7 @@
"language": {
"name": "unknown"
},
"name": "unknown",
"target": {
"name": "foo.bar.com:80",
"type": "http"
}
"name": "unknown"
},
"timestamp": {
"us": 1576500418000768
Expand Down Expand Up @@ -151,11 +147,7 @@
"language": {
"name": "unknown"
},
"name": "unknown",
"target": {
"name": "foo.bar.com:80",
"type": "http"
}
"name": "unknown"
},
"timestamp": {
"us": 1576500418000768
Expand Down Expand Up @@ -199,11 +191,7 @@
"language": {
"name": "unknown"
},
"name": "unknown",
"target": {
"name": "foo.bar.com:80",
"type": "http"
}
"name": "unknown"
},
"timestamp": {
"us": 1576500418000768
Expand Down Expand Up @@ -247,11 +235,7 @@
"language": {
"name": "unknown"
},
"name": "unknown",
"target": {
"name": "foo.bar.com:80",
"type": "http"
}
"name": "unknown"
},
"timestamp": {
"us": 1576500418000768
Expand Down Expand Up @@ -295,11 +279,7 @@
"language": {
"name": "unknown"
},
"name": "unknown",
"target": {
"name": "foo.bar.com:80",
"type": "http"
}
"name": "unknown"
},
"timestamp": {
"us": 1576500418000768
Expand Down Expand Up @@ -340,11 +320,7 @@
"language": {
"name": "unknown"
},
"name": "unknown",
"target": {
"name": "foo.bar.com:80",
"type": "http"
}
"name": "unknown"
},
"timestamp": {
"us": 1576500418000768
Expand Down Expand Up @@ -384,11 +360,7 @@
"language": {
"name": "unknown"
},
"name": "unknown",
"target": {
"name": "foo.bar.com:80",
"type": "http"
}
"name": "unknown"
},
"span": {
"id": "0000000041414646"
Expand Down Expand Up @@ -428,11 +400,7 @@
"language": {
"name": "unknown"
},
"name": "unknown",
"target": {
"name": "foo.bar.com:80",
"type": "http"
}
"name": "unknown"
},
"span": {
"id": "0000000041414646"
Expand Down Expand Up @@ -471,11 +439,7 @@
"language": {
"name": "unknown"
},
"name": "unknown",
"target": {
"name": "foo.bar.com:80",
"type": "http"
}
"name": "unknown"
},
"span": {
"id": "0000000041414646"
Expand Down
7 changes: 7 additions & 0 deletions input/otlp/traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 4c8b59d

Please sign in to comment.