open-telemetry / open-telemetry/opentelemetry-java-instrumentation

`rpc.server.duration` metric description is incorrect

Open
#9,478 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/rpc/RpcServerMetrics.java#L42

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.