import * as prometheus from '@prometheus-io/client'; import type { FastifyBaseLogger } from 'fastify'; import type { QueueDiscoverer } from './queueDiscoverers.js'; export type Metrics = { countGauge: prometheus.Gauge<'status' | 'queue'>; processedDuration: prometheus.Histogram<'status' | 'queue'>; finishedDuration: prometheus.Histogram<'status' | 'queue'>; }; export type MetricCollectorOptions = { bullMqPrefix: string; metricsPrefix: string; queueDiscoverer: QueueDiscoverer; excludedQueues: string[]; histogramBuckets: number[]; }; export declare class MetricsCollector { private readonly metrics; private readonly options; private readonly registry; private readonly logger; private observedQueues; constructor(options: MetricCollectorOptions, registry: prometheus.Registry, logger: FastifyBaseLogger); /** * Updates metrics for all discovered queues */ collect(): Promise; /** * Stops the metrics collection and cleans up resources */ dispose(): Promise; private registerMetrics; }