-
Notifications
You must be signed in to change notification settings - Fork 811
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
Update for the more restricted span status codes. #1701
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1701 +/- ##
============================================
+ Coverage 85.36% 85.44% +0.08%
- Complexity 1382 1386 +4
============================================
Files 164 164
Lines 5418 5395 -23
Branches 556 556
============================================
- Hits 4625 4610 -15
+ Misses 594 587 -7
+ Partials 199 198 -1
Continue to review full report at Codecov.
|
* @since 0.1.0 | ||
*/ | ||
UNAVAILABLE(14), | ||
OK(0), |
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.
Do we need the numbers anymore?
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 honestly not sure. I noticed that in the Jaeger mapping, we directly just copy that code over as a status code. Is that correct? No idea, either. I'd prefer to get rid of the numeric codes, and the accessor for them, but we need to decide what to do with the existing mappings.
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.
Got it - we can change this latter anyways.
@@ -121,7 +121,7 @@ public V call() throws Exception { | |||
|
|||
private static void setErrorStatus(Span span, Throwable t) { | |||
span.setStatus( | |||
Status.UNKNOWN.withDescription( | |||
Status.ERROR.withDescription( |
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 realised that I still an open question about this use case: open-telemetry/opentelemetry-specification#1008
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'd be happy to revisit this when the issue is clarified. Meanwhile, it does seem like approximately preserving the existing behavior is a good thing for now. And, as I commented on that issue, I think the intent with recordException
is that it's an error, most commonly.
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 that gets merged, I'll create an issue to address it here. Meanwhile, keeping the existing behavior seems like the right decision for this PR.
resolves #1700
Note: I made the numeric codes match the proposed protobuf status codes.