Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NullTracer

Dummy implementation of tracer that doesn't do anything.

It can be used in testing or in situations when tracing is required but shall be disabled.

see

ITracer

Hierarchy

  • NullTracer

Implements

Index

Methods

NullTracer

  • NullTracer(): void
  • Creates a new instance of the tracer.

    Returns void

beginTrace

  • beginTrace(correlationId: string, component: string, operation: string): TraceTiming
  • Begings recording an operation trace

    Parameters

    • correlationId: string

      (optional) transaction id to trace execution through call chain.

    • component: string

      a name of called component

    • operation: string

      a name of the executed operation.

    Returns TraceTiming

    a trace timing object.

failure

  • failure(correlationId: string, component: string, operation: string, error: Error, duration: number): void
  • Records an operation failure with its name, duration and error

    Parameters

    • correlationId: string

      (optional) transaction id to trace execution through call chain.

    • component: string

      a name of called component

    • operation: string

      a name of the executed operation.

    • error: Error

      an error object associated with this trace.

    • duration: number

      execution duration in milliseconds.

    Returns void

trace

  • trace(correlationId: string, component: string, operation: string, duration: number): void
  • Records an operation trace with its name and duration

    Parameters

    • correlationId: string

      (optional) transaction id to trace execution through call chain.

    • component: string

      a name of called component

    • operation: string

      a name of the executed operation.

    • duration: number

      execution duration in milliseconds.

    Returns void

Generated using TypeDoc