-
Notifications
You must be signed in to change notification settings - Fork 897
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
Updating gRPC status semantic conventions #1156
Updating gRPC status semantic conventions #1156
Conversation
Since the simplification of trace status codes, they no longer align with gRPC. Clarifying the expected status code field for gRPC, as well as the mappings between gRPC and OpenTelemetry status.
Specifically this: open-telemetry/opentelemetry-specification#1156
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.
Requesting changes, because it is not clear whether numeric or symbolic status code must be used (and if symbolic, which symbolic name)
Clarifying that gRPC spans should include the status code number, rather than leave it ambiguous. Adding gRPC semantic conventions in the yaml files to reflect these changes.
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.
Thank you for the update! 😃 Just a few smaller bits & pieces left before I think this is ready.
Were you able to find the documentation for the markdown tool? If not, where would you have looked? Maybe we can improve the situation here by placing more links to it in different places?
semantic_conventions/trace/rpc.yaml
Outdated
brief: 'Call-level attributes for gRPC' | ||
attributes: | ||
- id: status_code | ||
type: number |
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.
Hmm, this would logically be an integer enum but I don't think we support that yet, @thisthat ?
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 didn't see any... added open-telemetry/build-tools#19
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.
Sorry for the late response 😅
It is already possible to declare an integer enum with the current tool 😎
type: number | |
type: | |
allow_custom_values: false | |
members: | |
- id: OK | |
value: 0 | |
- id: CANCELLED | |
value: 1 | |
.... |
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.
let's add this?
As of #1214, the status codes changed and no longer line up with gRPC status codes, so now we'll just set `StatusCode.ERROR` and store the actual gRPC status code in the trace as `grpc.status_code`. Specifically this: open-telemetry/opentelemetry-specification#1156
Co-authored-by: Christian Neumüller <[email protected]>
Ran table-generation to ensure that semantic conventions are added. Removed tags for rpc.grpc yaml for now (not explicitly used).
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.
Thank you!
As of open-telemetry#1214, the status codes changed and no longer line up with gRPC status codes, so now we'll just set `StatusCode.ERROR` and store the actual gRPC status code in the trace as `grpc.status_code`. Specifically this: open-telemetry/opentelemetry-specification#1156
Co-authored-by: Armin Ruech <[email protected]>
re-generating TOC with markdown-toc There was a conflict with sub-headings matching the same string. As such qualified all headings.
semantic_conventions/trace/rpc.yaml
Outdated
brief: 'Call-level attributes for gRPC' | ||
attributes: | ||
- id: status_code | ||
type: number |
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.
Sorry for the late response 😅
It is already possible to declare an integer enum with the current tool 😎
type: number | |
type: | |
allow_custom_values: false | |
members: | |
- id: OK | |
value: 0 | |
- id: CANCELLED | |
value: 1 | |
.... |
gRPC's status_code code is better expressed as an enum.
No semantical change for 2 days and enough approvals. Merging (issue is allowed for GA) |
* Updating gRPC status semantic conventions Since the simplification of trace status codes, they no longer align with gRPC. Clarifying the expected status code field for gRPC, as well as the mappings between gRPC and OpenTelemetry status. * Adding changelog entry * Addressing feedback Clarifying that gRPC spans should include the status code number, rather than leave it ambiguous. Adding gRPC semantic conventions in the yaml files to reflect these changes. * adding trailing whitespace * Apply suggestions from code review Co-authored-by: Christian Neumüller <[email protected]> * addressing feedback Ran table-generation to ensure that semantic conventions are added. Removed tags for rpc.grpc yaml for now (not explicitly used). * Update specification/trace/semantic_conventions/rpc.md Co-authored-by: Armin Ruech <[email protected]> * Addressing feedback re-generating TOC with markdown-toc There was a conflict with sub-headings matching the same string. As such qualified all headings. * Switching gRPC status_code type to enum gRPC's status_code code is better expressed as an enum. Co-authored-by: Christian Neumüller <[email protected]> Co-authored-by: Armin Ruech <[email protected]>
Since the simplification of trace status codes,
they no longer align with gRPC.
Clarifying the expected status code field for gRPC, as
well as the mappings between gRPC and OpenTelemetry status.
Fixes #1044
Related issues #