Skip to content

Commit

Permalink
Add tag in receive span v2
Browse files Browse the repository at this point in the history
There is now a second method to convert otlp spans to dd spans. Adding
the has_exception tag in this method as well.
  • Loading branch information
Guillaume-Barrier committed Oct 14, 2024
1 parent 182e2de commit 8a5fddf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/trace/transform/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ func OtelSpanToDDSpan(
if otelspan.Events().Len() > 0 {
ddspan.Meta["events"] = MarshalEvents(otelspan.Events())
}
for i := range otelspan.Events().Len() {
if otelspan.Events().At(i).Name() == "exception" {
ddspan.Meta["_dd.span_events.has_exception"] = "true"
break
}
}
if otelspan.Links().Len() > 0 {
ddspan.Meta["_dd.span_links"] = MarshalLinks(otelspan.Links())
}
Expand Down

0 comments on commit 8a5fddf

Please sign in to comment.