UNPKG

@christiangalsterer/mongodb-driver-prometheus-exporter

Version:
37 lines (36 loc) 1.43 kB
import type { MongoClient } from 'mongodb'; import { type Registry } from 'prom-client'; import type { MongoDBDriverExporterOptions } from './exporter'; export declare class MongoDBDriverExporter { private readonly register; private readonly mongoClient; private readonly options; private readonly defaultOptions; private readonly poolSize; private readonly minSize; private readonly maxSize; private readonly checkedOut; private readonly waitQueueSize; private readonly waitQueueSeconds; private readonly MONGODB_DRIVER_POOL_SIZE; private readonly MONGODB_DRIVER_POOL_MIN; private readonly MONGODB_DRIVER_POOL_MAX; private readonly MONGODB_DRIVER_POOL_CHECKEDOUT; private readonly MONGODB_DRIVER_POOL_WAITQUEUESIZE; private readonly MONGODB_DRIVER_POOL_WAITQUEUE_SECONDS; private readonly commands; private readonly MONGODB_DRIVER_COMMANDS_SECONDS; constructor(mongoClient: MongoClient, register: Registry, options?: MongoDBDriverExporterOptions); enableMetrics(): void; private monitorCommands; private onConnectionPoolCreated; private onConnectionCreated; private onConnectionClosed; private onConnectionCheckOutStarted; private onConnectionCheckedOut; private onConnectionCheckOutFailed; private onConnectionCheckedIn; private onConnectionPoolClosed; private onCommandSucceeded; private onCommandFailed; }