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

added JSON RPC specific attributes #1643

Merged
merged 18 commits into from
May 7, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions semantic_conventions/trace/rpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,33 @@ groups:
required: always
brief: "The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request."
examples: [0, 1, 16]
- id: rpc.jsonrpc
arminru marked this conversation as resolved.
Show resolved Hide resolved
Rast1234 marked this conversation as resolved.
Show resolved Hide resolved
prefix: rpc.jsonrpc
extends: rpc
brief: 'Tech-specific attributes for JSON RPC.'
Rast1234 marked this conversation as resolved.
Show resolved Hide resolved
attributes:
- id: version
type: string
required:
conditional: 'If missing, it is assumed to be "2.0".'
brief: "Protocol version as in `jsonrpc` property of request/response. Since first protocol version does not specify this, value can be omitted entirely."
Rast1234 marked this conversation as resolved.
Show resolved Hide resolved
examples: ['2.0', '1.0']
- id: method
type: string
required: always
brief: "`method` property from request. Unlike `rpc.method`, this may not relate to the actual method being called."
Rast1234 marked this conversation as resolved.
Show resolved Hide resolved
examples: ['users.create', 'get_users']
- id: id
Rast1234 marked this conversation as resolved.
Show resolved Hide resolved
type: string
brief: "`id` property of request. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Omit if this is a notification."
examples: ['10', 'request-7', '']
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this would be generic enough to be added on the parent-level (e.g., as rpc.call_id or rpc.request_id) so we don't have overlaps/duplicates later if this is added for other protocols/frameworks as well. @open-telemetry/specs-approvers @open-telemetry/specs-trace-approvers any opinions?

- id: error_code
type: int
required:
conditional: 'If missing, response is assumed to be successful.'
brief: "`error.code` property of response if it is an error response."
examples: [-32700, 100]
- id: error_message
type: string
brief: "`error.message` property of response if it is an error response."
examples: ['Parse error', 'User already exists']
Rast1234 marked this conversation as resolved.
Show resolved Hide resolved