Interface AsyncSpanEndStrategy
-
public interface AsyncSpanEndStrategyRepresents an implementation of a strategy for composing over the return value of an asynchronous traced method which can compose or register for notification of completion at which point the span representing the invocation of the method will be ended.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectend(BaseTracer tracer, io.opentelemetry.context.Context context, Object returnValue)Denotes the end of the invocation of the traced method with a successful result which will end the span stored in the passedcontext.booleansupports(Class<?> returnType)
-
-
-
Method Detail
-
supports
boolean supports(Class<?> returnType)
-
end
Object end(BaseTracer tracer, io.opentelemetry.context.Context context, Object returnValue)
Denotes the end of the invocation of the traced method with a successful result which will end the span stored in the passedcontext. The span will remain open until the asynchronous operation has completed.- Parameters:
tracer-BaseTracertracer to be used to end the span stored in thecontext.returnValue- Return value from the traced method. Must be an instance of areturnTypefor whichsupports(Class)returned true (in particular it must not benull).- Returns:
- Either
returnValueor a value composing overreturnValuefor notification of completion.
-
-