/**
 * Digital Samba MCP Server - Metrics Module
 *
 * This module provides Prometheus metrics collection for the Digital Samba MCP Server.
 * It sets up standardized metrics for monitoring system health, request performance,
 * and Digital Samba API interactions.
 *
 * Features include:
 * - HTTP request metrics (count, duration, status codes)
 * - API client metrics (requests, errors, latency)
 * - System metrics (memory usage, CPU, etc.)
 * - Custom application metrics (cache hits/misses, rate limiting)
 * - Metrics endpoint for Prometheus scraping
 *
 * @module metrics
 * @author Digital Samba Team
 * @version 0.1.0
 */
import { Counter, Gauge, Histogram, Registry } from 'prom-client';
import express from 'express';
/**
 * Metrics configuration options
 */
export interface MetricsOptions {
    /** Whether to collect default Node.js metrics */
    defaultMetrics?: boolean;
    /** Prefix for all metrics */
    prefix?: string;
    /** Whether to enable HTTP request metrics */
    enableHttpMetrics?: boolean;
    /** Whether to enable API client metrics */
    enableApiMetrics?: boolean;
    /** Whether to enable cache metrics */
    enableCacheMetrics?: boolean;
    /** Whether to enable rate limiting metrics */
    enableRateLimitMetrics?: boolean;
    /** Collection interval for default metrics in milliseconds */
    defaultMetricsInterval?: number;
}
/**
 * Main metrics registry
 */
declare class MetricsRegistry {
    private registry;
    private options;
    private initialized;
    httpRequestsTotal: Counter;
    httpRequestDuration: Histogram;
    httpRequestsInFlight: Gauge;
    httpResponseSize: Histogram;
    apiRequestsTotal: Counter;
    apiRequestDuration: Histogram;
    apiErrorsTotal: Counter;
    cacheHitsTotal: Counter;
    cacheMissesTotal: Counter;
    cacheSize: Gauge;
    cacheEntriesCount: Gauge;
    rateLimitExceededTotal: Counter;
    rateLimitRemainingTokens: Gauge;
    appInfo: Gauge;
    activeConnections: Gauge;
    activeSessions: Gauge;
    circuitBreakersTotal: Counter;
    circuitBreakerSuccess: Counter;
    circuitBreakerFailures: Counter;
    circuitBreakerStateInfo: Gauge;
    circuitBreakerResets: Counter;
    circuitBreakerTrips: Counter;
    degradationHealthChecksTotal: Counter;
    degradationComponentStatusInfo: Gauge;
    degradationOverallStatusInfo: Gauge;
    degradationFallbacksRegisteredTotal: Counter;
    degradationFallbackActivationsTotal: Counter;
    degradationFallbackDeactivationsTotal: Counter;
    degradationFallbackSuccessTotal: Counter;
    degradationFallbackFailureTotal: Counter;
    degradationOperationDuration: Histogram;
    degradationOperationFailuresTotal: Counter;
    degradationCacheHitsTotal: Counter;
    degradationRetryAttemptsTotal: Counter;
    degradationRetrySuccessTotal: Counter;
    degradationRetryFailureTotal: Counter;
    /**
     * Constructor for the metrics registry
     * @param options Metrics configuration options
     */
    constructor(options?: MetricsOptions);
    /**
     * Initialize metrics collection
     */
    initialize(): void;
    /**
     * Get the metrics registry
     * @returns Prometheus Registry instance
     */
    getRegistry(): Registry<"text/plain; version=0.0.4; charset=utf-8">;
    /**
     * Reset all metrics
     */
    resetMetrics(): void;
    /**
     * Get metrics as string in Prometheus format
     * @returns Prometheus metrics string
     */
    getMetricsAsString(): Promise<string>;
    /**
     * Create Express middleware for tracking HTTP requests
     * @returns Express middleware function
     */
    createHttpMetricsMiddleware(): (req: express.Request, res: express.Response, next: express.NextFunction) => void;
    /**
     * Register metrics endpoint on an Express app
     * @param app Express application
     * @param path Optional path for metrics endpoint (default: /metrics)
     */
    registerMetricsEndpoint(app: express.Application, path?: string): void;
}
declare const metricsRegistry: MetricsRegistry;
/**
 * Initialize metrics collection with options
 * @param options Metrics configuration options
 * @returns The metrics registry instance
 */
export declare function initializeMetrics(options?: MetricsOptions): MetricsRegistry;
/**
 * Get the metrics registry instance
 * @returns The metrics registry
 */
export declare function getMetricsRegistry(): MetricsRegistry;
/**
 * Export the default metrics registry
 */
export default metricsRegistry;
//# sourceMappingURL=metrics.d.ts.map