Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Tracer] Adds SpanEvents Support for DD and OTEL #2754
[Tracer] Adds SpanEvents Support for DD and OTEL #2754
Changes from 9 commits
90802b9
5a57d67
738d8f3
62bec04
da56ae5
e5f6cd3
634b837
5b91448
63a4cc8
f3e2a3e
1fc93f6
daf5d2c
2fd7eb6
fc6feef
3bddb8e
8f74dff
1a19cca
16e1039
c682f08
d41a584
3b3cdf9
9c8d53a
ef1341a
853e555
8c2e716
8a5ea08
9863c7f
9d711ad
4d316e4
650ad50
95fd027
c6621ee
7d7734c
de384f4
aadf273
11478f5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Are you sure about this? Exceptions generally should only be added on spans if they escape their span.
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.
This is by design, to match what our Datadog Agent does for OTEL Events when it receives OTLP traces. If there are any
exception
events on a span, then the last event that is added will be used to populate the error tagging fields on the span.Note: We do not update the
span.Error
field when calling this method. To update thespan.Error
field, the user would have to call the OpenTelemetryspan.SetStatus
API with the Error status.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.
error
is set automatically whenerror.message
orerror.type
are present. So, at least that assumption is not correct here.When manually adding errors, users are supposed to only add
error.message
anderror = 1
is automatically added for them.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.
Also IIRC that behaviour of populating error.message is a fallback behaviour from the ages where no span event support existed in the UI.
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.
Hey @bwoebi, I've been looking into this ask here since I thought for us to work around this I could check if the span was an error or not, if not then reset the
error
tag but I am not sure how to accomplish this, for example I saw that the error can be removed from themetrics
object usingunset($this->span->metrics[Tag::ERROR]);
but couldn't find a way to do so for the body of the Span and wanted to check what you'd recommend.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.
What I would recommend is not doing this, honestly.
Like, it's a bad idea which goes against the defined semantics of the tracer. In the PHP tracer, error_msg/error_type is reserved for exceptions escaping the span.
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.
I see what you mean, will go ahead with only adding the
stack
tag for now and later connect with Error Tracking to try getting the details from the span event instead, does that sounds better at the moment?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.
Yes.