Skip to content

Conversation

@lmolkova
Copy link
Member

@lmolkova lmolkova commented Dec 20, 2025

Fixes #1773

Document mapping between gRPC native metrics and spans and OTel gRPC metrics and spans.

TODO:

@lmolkova lmolkova added the Skip Changelog Label to skip the changelog check label Dec 20, 2025
Copy link
Contributor

Copilot AI left a 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

@lmolkova lmolkova changed the title Document mapping between gRPC (native) and OTel gRPC conventions Document mapping between gRPC (native) and OTel conventions Dec 20, 2025
@github-actions
Copy link

github-actions bot commented Jan 4, 2026

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.

@github-actions github-actions bot added the Stale label Jan 4, 2026
@lmolkova lmolkova removed the Stale label Jan 7, 2026

> [!NOTE]
>
> OpenTelemetry defines experimental [`rpc.client.request.size`](/docs/rpc/rpc-metrics.md#metric-rpcclientrequestsize)
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
> 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)
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
> 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)

Comment on lines +116 to +117
- `server.address`
- `server.port`
Copy link
Member Author

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` |
Copy link
Member Author

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.

Comment on lines +130 to +132
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.
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog Label to skip the changelog check

Projects

Development

Successfully merging this pull request may close these issues.

Alignment with gRPC conventions

1 participant