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
Map Error Status to error tag in Zipkin & Jaeger #1257
Map Error Status to error tag in Zipkin & Jaeger #1257
Changes from 5 commits
d283999
2133e6b
4d618e2
cd5c3c7
1ea97b2
1fba8f2
f3d4176
f16cc91
b62b651
8534795
0bf7fa8
91f9c1f
70fd808
de9a65f
a6ebf3d
2891d74
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.
I'm a bit confused on the "override previous value" - does it mean that if the user set an error tag themselves, this may unset it if
Status
isUNSET
? Or if a user setserror=cats
, we override toerror=
? Just want to have an idea (maybe we can add some clarification)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 was trying to say that exporters can simply add the
error
tag on the end of the tag list which will effectively override anything already there (with the sameerror
key). My motivation for that was 1) I didn't want to leave it undefined and 2) checking for an existing tag is particularly expensive (O(n)
) in the .NET implementation so I was hoping to avoid needing to do that. Open to suggestions for change or improvement.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.
Why are we setting an
error
tag with empty string value and additionally addotel.status_description
instead of just setting theerror
tag with a string value equal to Status message?Doesn't Status message fit nicely in the
error
tag?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.
@tigrannajaryan The only issue with that is
error
tag must ONLY be sent if there was an actual error. So what we would need to do is seterror
instead ofotel.status_description
whenotel.status_code=ERROR
otherwise sendotel.status_description
(if it has a value forOK
orUNSET
cases). I don't have strong feelings either way. I will say that as-is is easier to implement (always sendingotel.status_description
when it has a value and then adding theerror
tag (empty) forotel.status_code=ERROR
) and it's non-breaking.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 believe Status.message is not supposed to be set for OK or UNSET cases. We should explicitly call it out in the spec. This means
error
tag will only be set equal to Spatus.message when Status.status==ERROR and for all other statuses there is no error message to record.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.
@tigrannajaryan I added some text on
Status
to clarifyDescription
should only be used withError
and then updated Zipkin & Jaeger based on that.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.
Just verifying that the
otel-java
code follows the specification and I've given the above a read and may have noticed a slight difference between thejaeger
andzipkin
exporter specs regarding the errorStatus
.In the
jaeger
specification it saysSo this means that for
jaeger
it sets theotel.status_description
if the status description is set - it does not mandate that it is ONLY set if there is an error. Additionally, if the status is an error, it shall add anerror
tag.However for
zipkin
it says the following:This describes that the
otel.status_description
tag isn't set but instead theerror
tag is the only thing that is set providing that there is an ERROR code and not OK or UNSET.Is there a reason why for
jaeger
we provide theotel.status_code
,otel.status_description
AND theerror
tag but forzipkin
we only provideotel.status_code
and theerror
tag.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.
@ChrisJBurns Slight differences in the implementations, basically. Zipkin
error
is a string where you can put the description. Jaegererror
is a bool (true/false) so it hasotel.status_description
for the description. The Zipkin text is a bit more specific because if you send something likeerror=OK
orerror=false
to Zipkin, it's still going to treat that span as failed.