Package org.apache.pinot.spi.trace
Interface Tracer
-
public interface TracerTracer responsible for trace state management. Users can implement this to filter what data is recorded, choose what format it is reported in (e.g. logs, JFR events, in-memory) and where it goes.
-
-
Method Summary
Modifier and Type Method Description InvocationRecordingactiveRecording()default RequestScopecreateRequestScope()StartsInvocationScopecreateScope(Class<?> clazz)voidregister(long requestId)Registers the requestId on the current thread.voidunregister()Detach a trace from the current thread.
-
-
-
Method Detail
-
register
void register(long requestId)
Registers the requestId on the current thread. This means the request will be traced. TODO: Consider using string id or random id. Currently different broker might send query with the same request id.- Parameters:
requestId- the requestId
-
unregister
void unregister()
Detach a trace from the current thread.
-
createScope
InvocationScope createScope(Class<?> clazz)
- Parameters:
clazz- the enclosing context, e.g. Operator, PlanNode, BlockValSet...- Returns:
- a new scope which MUST be closed on the current thread.
-
createRequestScope
default RequestScope createRequestScope()
Starts- Returns:
- the request record
-
activeRecording
InvocationRecording activeRecording()
- Returns:
- the active recording
-
-