Package io.micronaut.grpc.server.tracing
Class GrpcServerTracingInterceptorConfiguration
java.lang.Object
io.micronaut.grpc.server.tracing.GrpcServerTracingInterceptorConfiguration
@ConfigurationProperties("grpc.server.tracing")
public class GrpcServerTracingInterceptorConfiguration
extends Object
Adds a 
TracingServerInterceptor when OpenTracing for GRPC is on the classpath
 and allows integration with Zipkin and Jaeger.- Since:
 - 1.0
 - Author:
 - graemerocher
 
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGrpcServerTracingInterceptorConfiguration(io.opentracing.Tracer tracer) Default constructor. - 
Method Summary
Modifier and TypeMethodDescriptionio.opentracing.contrib.grpc.TracingServerInterceptor.BuildervoidsetServerCloseDecorator(@Nullable io.opentracing.contrib.grpc.ServerCloseDecorator serverCloseDecorator) Decorates the server span with custom data when the gRPC call is closed.voidsetServerSpanDecorator(@Nullable io.opentracing.contrib.grpc.ServerSpanDecorator serverSpanDecorator) Decorates the server span with custom data. 
- 
Field Details
- 
PREFIX
- See Also:
 
 - 
builder
@ConfigurationBuilder(prefixes="with", allowZeroArgs=true) protected final io.opentracing.contrib.grpc.TracingServerInterceptor.Builder builder 
 - 
 - 
Constructor Details
- 
GrpcServerTracingInterceptorConfiguration
protected GrpcServerTracingInterceptorConfiguration(io.opentracing.Tracer tracer) Default constructor.- Parameters:
 tracer- The tracer
 
 - 
 - 
Method Details
- 
getBuilder
@NonNull public io.opentracing.contrib.grpc.TracingServerInterceptor.Builder getBuilder()- Returns:
 - The 
TracingServerInterceptor.Builder 
 - 
setServerSpanDecorator
@Inject public void setServerSpanDecorator(@Nullable @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 @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
 
 -