-
Notifications
You must be signed in to change notification settings - Fork 888
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
Error Flagging with Status Codes #966
Conversation
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.
Trying to ensure that we understand the implications of adding some things right now before GA, and the fact that this may cost us a lot of burden to maintain.
@bogdandrutu I believe what you are saying is that changes to the Status code look good to you, however the addition of the StatusSource is not so clear. Do you suggest that we make changes to the Status code list now but leave out the StatusSource? We can add StatusSource later since it is an additive change. I think that sounds reasonable to me, but there were some objections in the past that Status code alone is not enough. I am not sure I agree with the objections, but would like to understand them better. |
@tigrannajaryan reposting my thoughts from the thread above:
But I agree that if others have a use case right now, we could add it. Otherwise we can come back to status source post-ga, and see if the new status codes are sufficient for now. |
Based on feedback, I've pushed a new version which removes span status source. Let me know what you think. If anyone would still like to read the version with span status, it can be found here: |
Don't scare us, @tedsuo ! You removed span status source, not span status itself :) |
One thing that is not defined in OTEP 136 is that Traces Protobufs in OTLP are already declared stable. Changing the list of status codes is a breaking change and is not allowed for "stable" maturity. We will need to introduce this change in a backwards compatible manner (from protocol perspective). I am not completely sure how it needs to be done, some thought needs to be put into this. |
I think for the protocol, unset and ok should both map to the old ok, error should map to unknown_error. The new status and the source boolean will be new fields (new fields should be backwards compatible in protobuf). This means that there will be a (significant) loss of information for old receivers, but at least they still get a binary ok/error discrimination which should be the most important thing. |
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.
All in all this is what I expected after the OTEP 👍. The status source can be added later in a non-breaking way, leaving the default at "instrumentation".
specification/trace/api.md
Outdated
@@ -650,9 +627,9 @@ Returns the `StatusCanonicalCode` of this `Status`. | |||
Returns the description of this `Status`. | |||
Languages should follow their usual conventions on whether to return `null` or an empty string here if no description was given. | |||
|
|||
### GetIsOk | |||
### GetIsError |
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 think we should remove all getters from the status API, we don't have getters anywhere else in the API. Although that should be done outside this PR. But I would remove this getter, or keep the name GetIsOK and return true unless set to Error. Otherwise I expect coding mistakes could result from inverting the meaning.
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.
Completely agree.
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.
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 think we can indeed, in a separate PR.
Thank's for resolving the original issue in this comment ✔️
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.
Please fix other outstanding comments
@tedsuo can you please fix the build and remove the gRPC mention so this PR can be merged? |
@tedsuo please fix linter issues for the merge |
Ok, I believe this is ready to merge. |
no significant semantics changes for two days, and enough approvals. Merging |
* StatusSource definition * Update HTTP status code mapping * Remove span status * Apply feedback. * Remove unused link. * markdownlint * spelling Co-authored-by: Carlos Alberto Cortez <calberto.cortez@gmail.com>
Changes
Related issues #
#965
Related oteps #