Skip to content
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

Conversation

toumorokoshi
Copy link
Member

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 #

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.
@toumorokoshi toumorokoshi requested a review from a team as a code owner October 30, 2020 04:39
@toumorokoshi toumorokoshi requested a review from a team October 30, 2020 04:39
@toumorokoshi toumorokoshi requested a review from a team as a code owner October 30, 2020 04:39
alertedsnake pushed a commit to alertedsnake/opentelemetry-python that referenced this pull request Oct 30, 2020
Copy link
Member

@Oberon00 Oberon00 left a 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.
Copy link
Member

@Oberon00 Oberon00 left a 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 Show resolved Hide resolved
brief: 'Call-level attributes for gRPC'
attributes:
- id: status_code
type: number
Copy link
Member

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 ?

Copy link
Member Author

@toumorokoshi toumorokoshi Nov 2, 2020

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

Copy link
Member

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 😎

Suggested change
type: number
type:
allow_custom_values: false
members:
- id: OK
value: 0
- id: CANCELLED
value: 1
....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add this?

specification/trace/semantic_conventions/rpc.md Outdated Show resolved Hide resolved
semantic_conventions/trace/rpc.yaml Outdated Show resolved Hide resolved
semantic_conventions/trace/rpc.yaml Outdated Show resolved Hide resolved
codeboten pushed a commit to open-telemetry/opentelemetry-python that referenced this pull request Nov 2, 2020
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
toumorokoshi and others added 2 commits November 2, 2020 05:45
Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
Ran table-generation to ensure that semantic conventions are added.

Removed tags for rpc.grpc yaml for now (not explicitly used).
Copy link
Member

@Oberon00 Oberon00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

NathanielRN pushed a commit to NathanielRN/opentelemetry-python-contrib-1 that referenced this pull request Nov 2, 2020
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
specification/trace/semantic_conventions/rpc.md Outdated Show resolved Hide resolved
specification/trace/semantic_conventions/rpc.md Outdated Show resolved Hide resolved
toumorokoshi and others added 2 commits November 4, 2020 06:18
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
re-generating TOC with markdown-toc

There was a conflict with sub-headings matching the same string. As such
qualified all headings.
brief: 'Call-level attributes for gRPC'
attributes:
- id: status_code
type: number
Copy link
Member

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 😎

Suggested change
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.
@SergeyKanzhelev
Copy link
Member

SergeyKanzhelev commented Nov 6, 2020

No semantical change for 2 days and enough approvals. Merging (issue is allowed for GA)

@SergeyKanzhelev SergeyKanzhelev merged commit 504fca9 into open-telemetry:master Nov 6, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

should StatusCanonicalCode be applied for rpc?
7 participants