Class AbstractTraceInterceptor
java.lang.Object
io.micronaut.tracing.opentracing.interceptor.AbstractTraceInterceptor
- All Implemented Interfaces:
 io.micronaut.aop.Interceptor<Object,,Object> io.micronaut.aop.MethodInterceptor<Object,,Object> io.micronaut.core.order.Ordered
- Direct Known Subclasses:
 ContinueSpanInterceptor,NewSpanTraceInterceptor
@Internal
@Requires(beans=io.opentracing.Tracer.class)
public abstract sealed class AbstractTraceInterceptor
extends Object
implements io.micronaut.aop.MethodInterceptor<Object,Object> 
permits ContinueSpanInterceptor, NewSpanTraceInterceptor
Implements tracing logic for 
ContinueSpan and NewSpan
 using the Open Tracing API.- Since:
 - 1.0
 - Author:
 - graemerocher
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final io.micronaut.core.convert.ConversionServicestatic final Stringprotected final io.opentracing.TracerFields inherited from interface io.micronaut.aop.Interceptor
ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGETFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTraceInterceptor(io.opentracing.Tracer tracer, io.micronaut.core.convert.ConversionService conversionService) Initialize the interceptor with tracer and conversion service. - 
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()static voidLogs an error to the span.protected final voidpopulateTags(io.micronaut.aop.MethodInvocationContext<Object, Object> context, io.opentracing.Span span) protected final voidtagArguments(io.opentracing.Span span, io.micronaut.aop.MethodInvocationContext<Object, Object> context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.aop.MethodInterceptor
intercept, intercept 
- 
Field Details
- 
CLASS_TAG
- See Also:
 
 - 
METHOD_TAG
- See Also:
 
 - 
tracer
protected final io.opentracing.Tracer tracer - 
conversionService
protected final io.micronaut.core.convert.ConversionService conversionService 
 - 
 - 
Constructor Details
- 
AbstractTraceInterceptor
protected AbstractTraceInterceptor(io.opentracing.Tracer tracer, io.micronaut.core.convert.ConversionService conversionService) Initialize the interceptor with tracer and conversion service.- Parameters:
 tracer- for span creation and propagation across arbitrary transportsconversionService- theConversionServiceinstance
 
 - 
 - 
Method Details
- 
getOrder
public int getOrder()- Specified by:
 getOrderin interfaceio.micronaut.core.order.Ordered
 - 
populateTags
 - 
logError
Logs an error to the span.- Parameters:
 span- the spane- the error
 - 
tagArguments
 
 -