Package org.apache.cxf.tracing
Interface TracerContext
public interface TracerContext
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a key/value pair to the currently active span.<T> TcontinueSpan(Traceable<T> traceable) Picks up an currently detached span from another thread.<T> TStarts a new span in the current thread.voidAdds a timeline to the currently active span.default <T> TReturns an object of the specified type to allow access to the specific API of the tracing provider.<T> Callable<T>Wraps the traceable into a new span, preserving the current span as a parent.
-
Method Details
-
continueSpan
Picks up an currently detached span from another thread. This method is intended to be used in the context of JAX-RS asynchronous invocations, where request and response are effectively executed by different threads.- Parameters:
traceable- traceable implementation to be executed- Returns:
- the result of the execution
- Throws:
Exception- any exception being thrown by the traceable implementation
-
startSpan
Starts a new span in the current thread.- Parameters:
description- span description- Returns:
- span instance object
-
wrap
Wraps the traceable into a new span, preserving the current span as a parent.- Parameters:
description- span descriptiontraceable- traceable implementation to be wrapped- Returns:
- callable to be executed (in current thread or any other thread pool)
-
annotate
Adds a key/value pair to the currently active span.- Parameters:
key- key to addvalue- value to add
-
timeline
Adds a timeline to the currently active span.- Parameters:
message- timeline message
-
unwrap
Returns an object of the specified type to allow access to the specific API of the tracing provider.- Parameters:
clazz- - the class of the object to be returned.- Returns:
- an instance of the specified class
-