Skip to content

Healthcheck Prometheus API

Functions

toOpenMetricsText

Source
toOpenMetricsText(report: HealthReport, options?: OpenMetricsExportOptions) => string

Exported from: @nexload-sdk/healthcheck-prometheus

Public function exported by @nexload-sdk/healthcheck-prometheus.

toPrometheusText

Source
toPrometheusText(report: HealthReport, options?: PrometheusExportOptions) => string

Exported from: @nexload-sdk/healthcheck-prometheus

Public function exported by @nexload-sdk/healthcheck-prometheus.

Interfaces

PrometheusExportOptions

Source
interface PrometheusExportOptions {
  prefix?: string
  defaultLabels?: Record<string, string>
  includeDescriptions?: boolean
}

Exported from: @nexload-sdk/healthcheck-prometheus

Public interface exported by @nexload-sdk/healthcheck-prometheus.

Types

OpenMetricsExportOptions

Source
type OpenMetricsExportOptions = PrometheusExportOptions;

Exported from: @nexload-sdk/healthcheck-prometheus

Public type exported by @nexload-sdk/healthcheck-prometheus.

  • toPrometheusText(report, options?) returns newline-terminated text.
  • toOpenMetricsText(report, options?) appends the OpenMetrics EOF marker.
  • PrometheusExportOptions supports prefix, defaultLabels, and includeDescriptions.
  • OpenMetricsExportOptions aliases the same options.

Source: src/index.ts.