RPC Semantic Conventions diverge from HTTP Semantic conventions for similar metrics #2214
Labels
area:semantic-conventions
Related to semantic conventions
spec:metrics
Related to the specification/metrics directory
Background
RPC semantic conventions were based on theOpenCensus gRPC specification. This was 13 motnhs ago when the OpenTelemetry Metrics API and SDK were still unstable and the View specification was not known. In particular, the OpenCensus specification (due to its stats API) was able to strike a balance where:
In the OpenTelemetry semantic conventions, we only have the instrumentation component, which is likely to lead to cardinality issues (as we store
net.peer.ip
on server-side latency metrics).HTTP Semantic Conventions
Currently the HTTP semantic conventions strike a balance where effectively latency metrics (both sever + client) attempt to record the server identity as best as possible (via
http.url
,http.host_name
,http.target
, etc.)Likely we should take an initial (conservative) approach for RPC metrics to prevent cardinality issues where specifying required Views (something common in OpenCensus) is not in OpenTelemetry (where views default based on instrument).
Proposal
We update the RPC semantic conventions so that:
net.peer.name
(or if unavailablenet.peer.ip
).host.name
(or if unavailablehost.ip
).The text was updated successfully, but these errors were encountered: