Package com.google.cloud.hadoop.util
Class TraceOperation
java.lang.Object
com.google.cloud.hadoop.util.TraceOperation
- All Implemented Interfaces:
ITraceOperation,AutoCloseable
Helps trace a block of code.
Use TraceOperation.createRootWithLogging to setup tracing on a thread. Use
TraceOperation.addToExistingTrace to add to the existing tracer. Use
TraceOperation.getChildTrace to track operation which runs in another thread
NOTE: Ensure that close() is called on each of the operation. NOTE: This class is for internal use and can change without notice.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ITraceOperationaddToExistingTrace(String name) voidvoidclose()static ITraceOperationcreateRootWithLogging(String name, Object context) static ThreadTracecurrent()static ITraceOperationgetChildTrace(ThreadTrace parentTrace, String name) getTrace()static String
-
Method Details
-
createRootWithLogging
-
addToExistingTrace
-
current
-
getChildTrace
-
getTrackingId
-
getTrace
- Specified by:
getTracein interfaceITraceOperation
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceITraceOperation
-
annotate
- Specified by:
annotatein interfaceITraceOperation
-