Options
All
  • Public
  • Public/Protected
  • All
Menu

Abstract Metric Class, used to extends all supported metrics.

import { Metrics } from "@mists/nestjs-metrics";

export class CustomMetric extends Metric {
  constructor(name: string, options: MetricOptions) {
    super(name, Metrics.Counter, options);
  }

  // ...
}

Hierarchy

Index

Constructors

Properties

Accessors

Constructors

constructor

  • Parameters

    • name: string

      Name used for the metric

    • type: Metrics

      Type of the metric

    • options: MetricOptions

      Options for the metric
      Depending on the metric technology used. Even though the MetricOptions support almost all options for each supported technology, be careful how you use and setup your options since they may generated strange behaviors that were not intended with this API.

    Returns Metric

Properties

Protected name

name: string

Name used for the metric

Protected options

options: MetricOptions

Options for the metric
Depending on the metric technology used. Even though the MetricOptions support almost all options for each supported technology, be careful how you use and setup your options since they may generated strange behaviors that were not intended with this API.

Protected prometheusMetric

prometheusMetric: any

Protected statsdClient

statsdClient: any

Accessors

Protected statsdName

  • get statsdName(): string

Legend

  • Property
  • Method
  • Constructor
  • Method
  • Inherited method
  • Protected property
  • Static method

Generated using TypeDoc