open-telemetry / open-telemetry/opentelemetry-java-instrumentation
`rpc.server.duration` metric description is incorrect
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1.2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 228
Description
Describe the bug
The rpc.server.duration metric has a description that does not conform with the OpenTelemetry semantic convention. This creates an issue when used with OpenTelemetry instrumented services that emit the same metric from a different language SDK (ie: Go). The OpenTelemetry Collector's, Prometheus exporter will specifically drop a metric if received that has the same name but a different description from a metric previously received.
We have run into this issue on the OpenTelemetry Demo project, our workaround is to write a special transform rule to remove descriptions from offending metrics.
Steps to reproduce
Using the gRPC auto instrumentation library with metrics being exported.
Expected behavior
The description for the rpc.server.duration metric should be: Measures the duration of inbound RPC.
This is defined in the OpenTelemetry semantic convention for this metric.
Actual behavior
The description for the rpc.server.duration metric is: The duration of an inbound RPC invocation
Javaagent or library instrumentation version
1.30.0
Environment
No response
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/rpc/RpcServerMetrics.java around line 42 and compare the rpc.server.duration description with the linked semantic convention. Done means the metric uses the specified description, with the relevant instrumentation behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100