@mollitia/prometheus
Version:
Prometheus Mollitia Addon
38 lines (37 loc) • 1.21 kB
TypeScript
import { PrometheusMetric } from './metrics/index.js';
import { PrometheusCounter } from './metrics/counter.js';
import { PrometheusGauge } from './metrics/gauge.js';
import * as Mollitia from 'mollitia';
export interface PrometheusCommonMetrics {
[key: string]: PrometheusMetric;
/**
* The total count of executions.
*/
total_executions: PrometheusCounter;
/**
* The total count of success.
*/
total_success: PrometheusCounter;
/**
* The total count of failures.
*/
total_failures: PrometheusCounter;
/**
* The maximum duration of execution.
*/
duration_max: PrometheusGauge;
/**
* The average duration of execution.
*/
duration_ave: PrometheusGauge;
/**
* The minimum duration of execution.
*/
duration_min: PrometheusGauge;
/**
* The number of execution used for the duration.
*/
duration_count: PrometheusGauge;
}
export declare const getMetricName: (executor: Mollitia.Circuit | Mollitia.Module) => string;
export declare const commonMetrics: (executor: Mollitia.Circuit | Mollitia.Module, options: Mollitia.CircuitOptions | Mollitia.ModuleOptions) => PrometheusCommonMetrics;