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.

public constructor((correlationId: string, name: string, verb: string, logger: ILogger, counters: ICounters, counterTiming: CounterTiming, traceTiming: TraceTiming)

  • correlationId: string - transaction id used to trace execution through the call chain.
  • name: string - name
  • verb: string - verb or ‘call’
  • logger: ILogger - logger
  • counters: ICounters - counters
  • counterTiming: CounterTiming - counter
  • traceTiming: TraceTiming - time tracer

Instance methods

endFailure

Manages a failed service end.

endFailure(err: Error): void

  • err: Error - exception

endTiming

Ends the service.

endTiming(err?: Error): void

  • err: Error - exception

endSuccess

Manages a successful service end.

endSuccess(): void