-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider spans with exception spanEvents as errors #30064
Changes from all commits
42def98
182e2de
8a5fddf
d815c6c
71d6b82
2d590bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -517,6 +517,12 @@ func (o *OTLPReceiver) convertSpan(rattr map[string]string, lib pcommon.Instrume | |
if in.Events().Len() > 0 { | ||
transform.SetMetaOTLP(span, "events", transform.MarshalEvents(in.Events())) | ||
} | ||
for i := range in.Events().Len() { | ||
if in.Events().At(i).Name() == "exception" { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we do contains? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. from what I can see in the otel specs, the name of an exception span event should always be "exception", is there any reason not to use the built-in string comparison operator |
||
span.Meta["_dd.span_events.has_exception"] = "true" | ||
break | ||
} | ||
} | ||
if in.Links().Len() > 0 { | ||
transform.SetMetaOTLP(span, "_dd.span_links", transform.MarshalLinks(in.Links())) | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Each section from every release note are combined when the | ||
# CHANGELOG.rst is rendered. So the text needs to be worded so that | ||
# it does not depend on any information only available in another | ||
# section. This may mean repeating some details, but each section | ||
# must be readable independently of the other. | ||
# | ||
# Each section note must be formatted as reStructuredText. | ||
--- | ||
enhancements: | ||
- | | ||
APM: Consider spans with OpenTelemetry exception Span Events as error spans. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will this tag be set?
When:
exception.escaped
true, orI ask because if the logic is consistent, it's best to implement it here, instead of letting every library implement individually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Marco! tag is set for any exception (see otlp.go)