Package brave.grpc

Class GrpcTracing.Builder

java.lang.Object
brave.grpc.GrpcTracing.Builder
Enclosing class:
GrpcTracing

public static final class GrpcTracing.Builder
extends Object
  • Method Details

    • clientParser

      public GrpcTracing.Builder clientParser​(GrpcClientParser clientParser)
    • serverParser

      public GrpcTracing.Builder serverParser​(GrpcServerParser serverParser)
    • grpcPropagationFormatEnabled

      public GrpcTracing.Builder grpcPropagationFormatEnabled​(boolean grpcPropagationFormatEnabled)
      When true, "grpc-trace-bin" is preferred when extracting trace context. This is useful when OpenCensus implements tracing upstream or downstream. Default is false.

      This wraps an existing propagation implementation, but prefers extracting "grpc-trace-bin" and "grpc-tags-bin" when parsing gRPC metadata. The incoming service method is propagated to outgoing client requests and written in the tags context as the key named "method". Regardless of whether "grpc-trace-bin" was parsed, it is speculatively written on outgoing requests.

      Warning: the format of both "grpc-trace-bin" and "grpc-tags-bin" are version 0. As such, consider this feature experimental.

    • build

      public GrpcTracing build()