Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PrometheusExporter

Implements

  • MetricExporter

Index

Constructors

constructor

Properties

Static Readonly DEFAULT_OPTIONS

DEFAULT_OPTIONS: { appendTimestamp: boolean; endpoint: string; host: undefined; port: number; prefix: string } = ...

Type declaration

  • appendTimestamp: boolean
  • endpoint: string
  • host: undefined
  • port: number
  • prefix: string

Methods

export

  • export(records: MetricRecord[], cb: (result: ExportResult) => void): void
  • Saves the current values of all exported {@link MetricRecord}s so that they can be pulled by the Prometheus backend.

    In its current state, the exporter saves the current values of all metrics when export is called and returns them when the export endpoint is called. In the future, this should be a no-op and the exporter should reach into the metrics when the export endpoint is called. As there is currently no interface to do this, this is our only option.

    Parameters

    • records: MetricRecord[]

      Metrics to be sent to the prometheus backend

    • cb: (result: ExportResult) => void

      result callback to be called on finish

        • (result: ExportResult): void
        • Parameters

          • result: ExportResult

          Returns void

    Returns void

getMetricsRequestHandler

  • getMetricsRequestHandler(_request: IncomingMessage, response: ServerResponse): void

shutdown

  • shutdown(): Promise<void>

startServer

  • startServer(): Promise<void>

stopServer

  • stopServer(): Promise<void>

Generated using TypeDoc