This repository was archived by the owner on Dec 23, 2023. It is now read-only.
This repository was archived by the owner on Dec 23, 2023. It is now read-only.
gRpc client stats are not populated, additional configuration required #2080
Open
Description
Please answer these questions before submitting a bug report.
What version of OpenCensus are you using?
<properties>
<io.grpc.version>1.35.0</io.grpc.version>
<java.version>11</java.version>
<opencensus.version>0.28.3</opencensus.version>
</properties>
What JVM are you using (java -version
)?
openjdk version "11.0.9" 2020-10-20
OpenJDK Runtime Environment (build 11.0.9+11-alpine-r0)
OpenJDK 64-Bit Server VM (build 11.0.9+11-alpine-r0, mixed mode)
What did you do?
If possible, provide a recipe for reproducing the error.
- Configure opencensus instrumentation as described here:
a. https://opencensus.io/guides/grpc/java/#instrumenting-the-client
b. https://opencensus.io/zpages/java/#1 - When app starts and does few grpc exchanges, hit prometheus endpoint
- Observe only help for metrics
- Hit zPages endpoing
- Observe empty page
What did you expect to see?
Some stats related to invoked grpc methods
What did you see instead?
Just helptext for possible stats
Additional context
To enable stats following dependency needs to be included:
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-census</artifactId>
<version>${io.grpc.version}</version>
</dependency>
Also following code snipped needs to be added for gRpc stats to be gathered, when configuring managed channel
ManagedChannelBuilder<?> builder = ManagedChannelBuilder
.forAddress(serverUrl, port)
.keepAliveTime(keepAliveMinutes, TimeUnit.MINUTES)
.intercept(InternalCensusStatsAccessor.getClientInterceptor(true, true, true));
return builder.build().
Even with changes from above, zPages still do not contain information about grpc invocations.
Activity