Skip to content

GrpcMetricsInterceptor records into a private SimpleMeterRegistry disconnected from the server registry — gRPC metrics black-holed #4826

Description

@ruispereira

Affected version: 26.6.1
Component: GrpcMetricsInterceptor
Severity: MEDIUM (observability)

Summary

The interceptor builds its own new SimpleMeterRegistry() (the comment admits "In
production, integrate with server's meter registry"), disconnected from the global
Metrics registry the rest of the service uses. Per-method metrics are written
into call trailers rather than tagged meters.

Code

GrpcMetricsInterceptor.java:43-58 (private registry), :81-82 (trailers).

Impact

gRPC request/error/duration metrics never reach the real registry — operators see
no gRPC telemetry from this interceptor.

Suggested fix

Inject/look up the server's shared MeterRegistry; record method/status as meter
tags.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions