pip_services3_components.trace.ITracer module

class pip_services3_components.trace.ITracer.ITracer

Bases: abc.ABC

Interface for tracer components that capture operation traces.

begin_trace(correlation_id: Optional[str], component: str, operation: str)pip_services3_components.trace.TraceTiming.TraceTiming

Begings recording an operation trace

Parameters
  • correlation_id – (optional) transaction id to trace execution through call chain.

  • component – a name of called component

  • operation – a name of the executed operation.

Returns

a trace timing object.

failure(correlation_id: Optional[str], component: str, operation: str, error: Exception, duration: float)

Records an operation failure with its name, duration and error

Parameters
  • correlation_id – (optional) transaction id to trace execution through call chain.

  • component – a name of called component

  • operation – a name of the executed operation.

  • error – an error object associated with this trace.

  • duration – execution duration in milliseconds.

trace(correlation_id: Optional[str], component: str, operation: str, duration: float)

Records an operation trace with its name and duration

Parameters
  • correlation_id – (optional) transaction id to trace execution through call chain.

  • component – a name of called component

  • operation – a name of the executed operation.

  • duration – execution duration in milliseconds.