Hierarchy

  • FlatCountMetrics

Constructors

Properties

Methods

Constructors

  • Accumulate (add together) values for putMetric calls for Units that can be added (e.g. everything except the PerSecond Units).

    Emit the accumulated metrics to a MetricsLogger class when flush is called. Note that the MetricsLogger must then be flushed or used with metricsScope to ensure it is flushed.

    Returns FlatCountMetrics

Properties

metrics: Map<string, {
    unit: Unit;
    value: number;
}> = ...

Type declaration

  • unit: Unit
  • value: number

Methods

  • Write the accumulated counts through to an object implementing the MetricsLogger interface and releases the accumulated map of metric names and counts. Subsequent calls to putMetric will need another call to flush.

    Parameters

    • logger: MetricsLogger

      MetricsLogger or MetricsLoggerDummy

    Returns void

  • Get the value for a specified metric key, if desired

    Parameters

    • key: string

    Returns {
        unit: Unit;
        value: number;
    }

    • unit: Unit
    • value: number
  • Put a metric value. These values will only be emitted to CloudWatch when flush() is called, which will put the current count into a metric.

    Parameters

    • key: string
    • value: number
    • unit: Unit

      Any Unit that can be aggregated (e.g. Count, Bytes, Milliseconds but not BytesPerSecond)

    Returns FlatCountMetrics

Generated using TypeDoc