Class GrpcServerTracingInterceptorConfiguration


  • @ConfigurationProperties("grpc.server.tracing")
    public class GrpcServerTracingInterceptorConfiguration
    extends java.lang.Object
    Adds a TracingServerInterceptor when OpenTracing for GRPC is on the classpath and allows integration with Zipkin and Jaeger.
    Since:
    1.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected io.opentracing.contrib.grpc.TracingServerInterceptor.Builder builder  
      static java.lang.String PREFIX  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.opentracing.contrib.grpc.TracingServerInterceptor.Builder getBuilder()  
      void setServerCloseDecorator​(io.opentracing.contrib.grpc.ServerCloseDecorator serverCloseDecorator)
      Decorates the server span with custom data when the gRPC call is closed.
      void setServerSpanDecorator​(io.opentracing.contrib.grpc.ServerSpanDecorator serverSpanDecorator)
      Decorates the server span with custom data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • builder

        @ConfigurationBuilder(prefixes="with",
                              allowZeroArgs=true)
        protected final io.opentracing.contrib.grpc.TracingServerInterceptor.Builder builder
    • Constructor Detail

      • GrpcServerTracingInterceptorConfiguration

        protected GrpcServerTracingInterceptorConfiguration​(io.opentracing.Tracer tracer)
        Default constructor.
        Parameters:
        tracer - The tracer
    • Method Detail

      • getBuilder

        @NonNull
        public io.opentracing.contrib.grpc.TracingServerInterceptor.Builder getBuilder()
        Returns:
        The TracingServerInterceptor.Builder
      • setServerSpanDecorator

        @Inject
        public void setServerSpanDecorator​(@Nullable
                                           io.opentracing.contrib.grpc.ServerSpanDecorator serverSpanDecorator)
        Decorates the server span with custom data.
        Parameters:
        serverSpanDecorator - used to decorate the server span
      • setServerCloseDecorator

        @Inject
        public void setServerCloseDecorator​(@Nullable
                                            io.opentracing.contrib.grpc.ServerCloseDecorator serverCloseDecorator)
        Decorates the server span with custom data when the gRPC call is closed.
        Parameters:
        serverCloseDecorator - used to decorate the server span