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(correlation_id: Optional[str], name: str, verb: str, logger: ILogger, counters: ICounters, counter_timing: Optional[CounterTiming], trace_timing: Optional[TraceTiming])
- correlation_id: Optional[str] - transaction id used to trace execution through the 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()