-
Notifications
You must be signed in to change notification settings - Fork 299
Document mapping between gRPC (native) and OTel conventions #3229
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
base: main
Are you sure you want to change the base?
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.
Pull request overview
This PR documents the mapping between gRPC native OpenTelemetry conventions (defined in gRPC proposals A66 for metrics and A72 for tracing) and the official OpenTelemetry semantic conventions for gRPC hosted in this repository. The documentation helps users understand how to convert between the two convention systems.
Key Changes
- Adds a new compatibility document (
docs/non-normative/compatibility/grpc-compatibility.md) providing detailed mappings for metrics, spans, and their attributes - Updates the gRPC conventions page to reference the new compatibility document
- Removes duplicate gRPC convention references from the RPC README
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
docs/non-normative/compatibility/grpc-compatibility.md |
New compatibility document detailing attribute, metric, and span mappings between gRPC and OTel conventions, including conversion instructions |
docs/rpc/grpc.md |
Adds a note referencing the gRPC project's conventions and linking to the new compatibility document |
docs/rpc/README.md |
Removes redundant reference to gRPC specifications that is now better documented in the compatibility guide |
e9efa82 to
e9a0391
Compare
|
This PR has been labeled as stale due to lack of activity. It will be automatically closed if there is no further activity over the next 7 days. |
|
|
||
| > [!NOTE] | ||
| > | ||
| > OpenTelemetry defines experimental [`rpc.client.request.size`](/docs/rpc/rpc-metrics.md#metric-rpcclientrequestsize) |
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.
| > OpenTelemetry defines experimental [`rpc.client.request.size`](/docs/rpc/rpc-metrics.md#metric-rpcclientrequestsize) | |
| > OpenTelemetry defines [`rpc.client.request.size`](/docs/rpc/rpc-metrics.md#metric-rpcclientrequestsize) |
| > metrics measure uncompressed size and are recorded once per call even if the call involved | ||
| > multiple attempts. | ||
| > | ||
| > OpenTelemetry also defines experimental [`rpc.server.request.size`](/docs/rpc/rpc-metrics.md#metric-rpcserverrequestsize) |
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.
| > OpenTelemetry also defines experimental [`rpc.server.request.size`](/docs/rpc/rpc-metrics.md#metric-rpcserverrequestsize) | |
| > OpenTelemetry also defines [`rpc.server.request.size`](/docs/rpc/rpc-metrics.md#metric-rpcserverrequestsize) |
| - `server.address` | ||
| - `server.port` |
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.
depends on #3257
|
|
||
| | Property | gRPC | OpenTelemetry | Conversion comments | | ||
| | ---------- | ------------------------------------- | ------------------------------- | ------------------- | | ||
| | Event name | `Outbound message`, `Inbound message` | `rpc.message` | gRPC -> OTel: set to `rpc.message`<br>OTel -> gRPC: set to one of the message names depending on `rpc.message.type` | |
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.
todo: it's actually more complicated
gRPC records two events for one message sometimes - one with compressed size, another with uncompressed.
OTel records one event and includes size that are available.
| gRPC client call spans report an additional span event called `Delayed name resolution complete`. | ||
| When converting from gRPC to OTel spans, preserve this span event as-is. | ||
| When converting from OTel to gRPC spans, there is no way to represent this event. |
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.
| gRPC client call spans report an additional span event called `Delayed name resolution complete`. | |
| When converting from gRPC to OTel spans, preserve this span event as-is. | |
| When converting from OTel to gRPC spans, there is no way to represent this event. | |
| gRPC client call spans contain additional events that could be recorded as is when converting to OTel. |
Fixes #1773
Document mapping between gRPC native metrics and spans and OTel gRPC metrics and spans.
TODO: