Skip to content
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
@iggyzap

Description

@iggyzap

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.

  1. Configure opencensus instrumentation as described here:
    a. https://opencensus.io/guides/grpc/java/#instrumenting-the-client
    b. https://opencensus.io/zpages/java/#1
  2. When app starts and does few grpc exchanges, hit prometheus endpoint
  3. Observe only help for metrics
  4. Hit zPages endpoing
  5. 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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @iggyzap

        Issue actions

          gRpc client stats are not populated, additional configuration required · Issue #2080 · census-instrumentation/opencensus-java