The GitHub Actions job "Build and Run Tests by Bazel" on 
rocketmq.git/feat/proxy-admin-grpc-call-metrics has failed.
Run started by GitHub user Felix-Gong (triggered by Felix-Gong).

Head commit for run:
272b558f756c6cc1808fcfe0053c9405e5eb4622 / Felix-Gong 
<[email protected]>
[ISSUE #11474] feat(proxy): expose call metrics for the admin gRPC interface

The proxy exports an OpenTelemetry pipeline in both modes but registers
only the rocketmq_proxy_up gauge: call rate, latency and error rate of
the admin gRPC server are invisible, so a healthy-looking up gauge says
nothing about auth rejections or failing admin calls.

Add ProxyAdminMetricsInterceptor to the admin server and two
instruments registered through the existing initMetrics path:
rocketmq_proxy_admin_calls_total and rocketmq_proxy_admin_rt
(milliseconds), labeled with the bare method name and the terminal
invocation_status on top of the node/cluster/proxy_mode attributes.

The interceptor wraps close(Status) and records exactly once per call
(the cancel/close race is settled by an AtomicBoolean), and is
registered after the auth interceptor so gRPC reverse-order execution
makes it the outer wrapper that also counts rejected calls. Listener
callbacks that throw are recorded before the exception is rethrown,
because GlobalExceptionInterceptor closes the call it holds directly
and would otherwise bypass the close wrapper. Instruments default to
NopLongCounter/NopLongHistogram, so disabled metrics or a call served
before manager start is a free no-op. LABEL_MAP becomes a
ConcurrentHashMap: recording now reads it on request threads while
start() populates it.

Tests: ProxyAdminMetricsInterceptorTest 7/7 (OK and PERMISSION_DENIED
recording, cancel/close dedup in both orders, delegate close
propagation, builtin method full name, thrown exceptions), a test
MetricReader asserts the exported names, labels and values,
GrpcServerInterceptorOrderTest pins the auth/metrics relative order.
Full proxy module: 465 green with checkstyle, spotbugs and misspell.

Report URL: https://github.com/apache/rocketmq/actions/runs/39530929823

With regards,
GitHub Actions via GitBox

Reply via email to