- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
ActiveTraceImpl,NoOpActiveTrace
An
ActiveTrace is a short-lived delegate that represents an active trace. It's generally
recommended to use it in a try-with-resource statement to safely control its start and end.-
Method Details
-
startSubTrace
Starts and returns a new sub-trace which will be the new active trace. It's generally recommended to call this method in a try-with-resource.- Parameters:
label- the label to use for this trace; may contain placeholderslabelFormatArgs- the format arguments for the placeholders in the label- Returns:
- the new active sub-trace
-
end
void end()Ends this trace and all sub-traces. -
close
default void close()Simply callsend().- Specified by:
closein interfaceAutoCloseable
-