@Singleton @Requires(beans=io.opentracing.Tracer.class) public class TraceInterceptor extends java.lang.Object implements MethodInterceptor<java.lang.Object,java.lang.Object>
ContinueSpan and
 NewSpan. Using the Open Tracing API.| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | CLASS_TAG | 
| static java.lang.String | METHOD_TAG | 
ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGETHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description | 
|---|
| TraceInterceptor(io.opentracing.Tracer tracer,
                ConversionService<?> conversionService)Initialize the interceptor with tracer and conversion service. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getOrder() | 
| java.lang.Object | intercept(MethodInvocationContext<java.lang.Object,java.lang.Object> context)Extended version of the  MethodInterceptor.intercept(InvocationContext)method that accepts aMethodInvocationContext. | 
| static void | logError(io.opentracing.Span span,
        java.lang.Throwable e)Logs an error to the span. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinterceptpublic static final java.lang.String CLASS_TAG
public static final java.lang.String METHOD_TAG
public TraceInterceptor(io.opentracing.Tracer tracer,
                        ConversionService<?> conversionService)
tracer - For span creation and propagation across arbitrary transportsconversionService - A service to convert from one type to anotherpublic int getOrder()
@Nullable public java.lang.Object intercept(MethodInvocationContext<java.lang.Object,java.lang.Object> context)
MethodInterceptorMethodInterceptor.intercept(InvocationContext) method that accepts a MethodInvocationContext.intercept in interface MethodInterceptor<java.lang.Object,java.lang.Object>context - The contextpublic static void logError(io.opentracing.Span span,
                            java.lang.Throwable e)
span - The spane - The error