Skip to content

Commit

Permalink
otelgrpc: Set "rpc.server.duration" metric description
Browse files Browse the repository at this point in the history
  • Loading branch information
puckpuck committed Sep 18, 2023
1 parent da0d2ea commit f44f5ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Added

- Add the new `go.opentelemetry.io/contrib/instrgen` package to provide auto-generated source code instrumentation. (#3068, #3108)
- Set the description for the `rpc.server.duration` metric in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. (#4302)

## [1.19.0/0.44.0/0.13.0] - 2023-09-12

Expand Down
5 changes: 4 additions & 1 deletion instrumentation/google.golang.org/grpc/otelgrpc/config.go
Expand Up @@ -72,7 +72,10 @@ func newConfig(opts []Option) *config {
metric.WithSchemaURL(semconv.SchemaURL),
)
var err error
if c.rpcServerDuration, err = c.meter.Int64Histogram("rpc.server.duration", metric.WithUnit("ms")); err != nil {
c.rpcServerDuration, err = c.meter.Int64Histogram("rpc.server.duration",
metric.WithDescription("Measures the duration of inbound RPC."),
metric.WithUnit("ms"))
if err != nil {
otel.Handle(err)
}

Expand Down

0 comments on commit f44f5ad

Please sign in to comment.