Class NullTracer
java.lang.Object
org.pipservices3.components.trace.NullTracer
- All Implemented Interfaces:
ITracer
Dummy implementation of tracer that doesn't do anything.
It can be used in testing or in situations when tracing is required but shall be disabled.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeginTrace(String correlationId, String component, String operation) Begings recording an operation tracevoidRecords an operation failure with its name, duration and errorvoidRecords an operation trace with its name and duration
-
Constructor Details
-
NullTracer
public NullTracer()
-
-
Method Details
-
trace
Records an operation trace with its name and duration -
failure
public void failure(String correlationId, String component, String operation, Exception error, long duration) Records an operation failure with its name, duration and error- Specified by:
failurein interfaceITracer- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.component- a name of called componentoperation- a name of the executed operation.error- an error object associated with this trace.duration- execution duration in milliseconds.
-
beginTrace
Begings recording an operation trace- Specified by:
beginTracein interfaceITracer- Parameters:
correlationId- (optional) transaction id to trace execution through call chain.component- a name of called componentoperation- a name of the executed operation.- Returns:
- a trace timing object.
-