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

RPC Semantic Conventions diverge from HTTP Semantic conventions for similar metrics #2214

Open
jsuereth opened this issue Dec 9, 2021 · 3 comments
Assignees
Labels
area:semantic-conventions Related to semantic conventions spec:metrics Related to the specification/metrics directory

Comments

@jsuereth
Copy link
Contributor

jsuereth commented Dec 9, 2021

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:

  • Instrumentation recorded many attributes (more than any user would want)
  • Views would refine these attributes to a reasonable cardinality for every day usage.

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:

  • Client metrics use net.peer.name (or if unavailable net.peer.ip).
  • Server metrics use host.name (or if unavailable host.ip).
@trask
Copy link
Member

trask commented Jan 7, 2022

@jsuereth just checking that this would also require updating the RPC semantic conventions for span attributes as well (so that metric attributes continue to be a subset of span attributes)

@jsuereth
Copy link
Contributor Author

@trask Sorry for long delays - IIRC the RPC semantic conventions for span included both end-points on both sides, so I THINK this should be ok, or am I missing something?

@trask
Copy link
Member

trask commented Jan 31, 2022

hey @jsuereth, I don't see net.host.name or net.host.ip mentioned in the rpc tracing semantic conventions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

No branches or pull requests

3 participants