InstrumentTiming

Creates logs, counters and timings for methods that call _instrument.

Description

The InstrumentTiming class allows you to create logs, countes and timings for methods that call _instrument.

Constructors

Creates a new instance of InstrumentTiming.

InstrumentTiming(context: Optional[IContext], name: str, verb: str, logger: ILogger, counters: ICounters, counter_timing: Optional[CounterTiming], trace_timing: Optional[TraceTiming])

  • context: IContext - (optional) a context to trace execution through a call chain.
  • name: str - name
  • verb: str - verb or ‘call’
  • logger: ILogger - logger
  • counters: ICounters - counters
  • counter_timing: Optional[CounterTiming] - counter
  • trace_timing: Optional[TraceTiming] - time tracer

Instance methods

end_failure

Manages a failed service end.

end_failure(err: Exception)

  • err: Exception - exception

end_timing

Ends the service.

end_timing(err: Exception = None)

  • err: Exception - TODO add description

end_success

Manages a successful service end.

end_success()