Creates a new instance of the tracer.
Begings recording an operation trace
(optional) transaction id to trace execution through call chain.
a name of called component
a name of the executed operation.
a trace timing object.
Configures component by passing configuration parameters.
configuration parameters to be set.
Records an operation failure with its name, duration and error
(optional) transaction id to trace execution through call chain.
a name of called component
a name of the executed operation.
an error object associated with this trace.
execution duration in milliseconds.
Sets references to dependent components.
references to locate the component dependencies.
Records an operation trace with its name and duration
(optional) transaction id to trace execution through call chain.
a name of called component
a name of the executed operation.
execution duration in milliseconds.
Generated using TypeDoc
Tracer that dumps recorded traces to logger.
Configuration parameters
References
*:logger:*:*:1.0
ILogger components to dump the captured counters*:context-info:*:*:1.0
(optional) ContextInfo to detect the context id and specify counters source[[Tracer]]
CachedCounters
CompositeLogger
Example
let tracer = new LogTracer(); tracer.setReferences(References.fromTuples( new Descriptor("pip-services", "logger", "console", "default", "1.0"), new ConsoleLogger() )); let timing = trcer.beginTrace("123", "mycomponent", "mymethod"); try { ... timing.endTrace(); } catch(err) { timing.endFailure(err); }