Class CsmObservability

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    @ExperimentalApi("https://github.com/grpc/grpc-java/issues/11249")
    public final class CsmObservability
    extends Object
    implements Closeable
    The entrypoint for GCP's CSM OpenTelemetry metrics functionality in gRPC.

    CsmObservability uses OpenTelemetry APIs for instrumentation. When no SDK is explicitly added no telemetry data will be collected. See io.opentelemetry.sdk.OpenTelemetrySdk for information on how to construct the SDK.

    • Method Detail

      • registerGlobal

        public void registerGlobal()
        Registers CsmObservability globally, applying its configuration to all subsequently created gRPC channels and servers.

        Note: Only one of CsmObservability and GrpcOpenTelemetry instance can be registered globally. Any subsequent call to registerGlobal() will throw an IllegalStateException.