/**
 * Vorion Platform Metrics - Comprehensive Prometheus Observability
 *
 * Provides centralized metrics for monitoring all Vorion subsystems including:
 * - Intent processing pipeline
 * - Trust score calculations
 * - Policy evaluations
 * - API request latency
 * - Database and Redis connections
 * - Circuit breaker states
 *
 * All metrics are registered with the shared vorionRegistry for unified collection.
 *
 * @packageDocumentation
 * @module @vorionsys/common/metrics
 */
import { Counter, Histogram, Gauge, Summary } from 'prom-client';
import { vorionRegistry, getMetrics, getMetricsContentType } from './metrics-registry.js';
export { vorionRegistry, getMetrics, getMetricsContentType };
/**
 * Total intent submissions by status
 * Labels: status (approved, denied, escalated, pending, cancelled, error)
 */
export declare const intentSubmissionsTotal: Counter<"status" | "tenant_id" | "intent_type">;
/**
 * Intent processing duration from submission to terminal state
 */
export declare const intentProcessingDurationSeconds: Histogram<"status" | "tenant_id" | "intent_type">;
/**
 * Currently active intents being processed
 */
export declare const activeIntentsGauge: Gauge<"status" | "tenant_id">;
/**
 * Total trust score calculations
 */
export declare const trustScoreCalculationsTotal: Counter<"tenant_id" | "entity_type">;
/**
 * Trust score calculation duration
 */
export declare const trustScoreCalculationDurationSeconds: Histogram<"tenant_id">;
/**
 * Trust signals recorded
 */
export declare const trustSignalsRecordedTotal: Counter<"tenant_id" | "signal_type">;
/**
 * Current trust score distribution
 */
export declare const trustScoreDistribution: Histogram<"tenant_id" | "trust_level">;
/**
 * Total policy evaluations by result
 */
export declare const policyEvaluationsTotal: Counter<"result" | "tenant_id" | "namespace" | "policy_name">;
/**
 * Policy evaluation duration
 */
export declare const policyEvaluationDurationSeconds: Histogram<"tenant_id" | "namespace">;
/**
 * Number of rules evaluated per policy evaluation
 */
export declare const rulesEvaluatedPerRequest: Histogram<"tenant_id" | "namespace">;
/**
 * Policy cache hit/miss ratio
 */
export declare const policyCacheOperationsTotal: Counter<"operation" | "tenant_id">;
/**
 * API request duration by endpoint
 */
export declare const apiRequestDurationSeconds: Histogram<"method" | "route" | "status_code">;
/**
 * API requests total
 */
export declare const apiRequestsTotal: Counter<"method" | "route" | "status_code">;
/**
 * API request size in bytes
 */
export declare const apiRequestSizeBytes: Histogram<"method" | "route">;
/**
 * API response size in bytes
 */
export declare const apiResponseSizeBytes: Histogram<"method" | "route" | "status_code">;
/**
 * Currently active API requests
 */
export declare const apiActiveRequestsGauge: Gauge<"method" | "route">;
/**
 * API errors total
 */
export declare const apiErrorsTotal: Counter<"method" | "route" | "error_code" | "error_type">;
/**
 * Database pool active connections
 */
export declare const databasePoolActive: Gauge<string>;
/**
 * Database pool waiting clients
 */
export declare const databasePoolWaiting: Gauge<string>;
/**
 * Database pool idle connections
 */
export declare const databasePoolIdle: Gauge<string>;
/**
 * Database pool total size
 */
export declare const databasePoolTotal: Gauge<string>;
/**
 * Database pool utilization percentage
 */
export declare const databasePoolUtilization: Gauge<string>;
/**
 * Database connection errors
 */
export declare const databaseConnectionErrorsTotal: Counter<"error_type">;
/**
 * Redis active connections
 */
export declare const redisConnectionsActive: Gauge<string>;
/**
 * Redis connection errors
 */
export declare const redisConnectionErrorsTotal: Counter<"error_type">;
/**
 * Redis operations latency
 */
export declare const redisOperationDurationSeconds: Histogram<"operation">;
/**
 * Redis operations total
 */
export declare const redisOperationsTotal: Counter<"operation" | "result">;
/**
 * Redis memory usage
 */
export declare const redisMemoryUsageBytes: Gauge<string>;
/**
 * Circuit breaker state gauge
 * 0 = closed (normal operation)
 * 1 = open (failing fast)
 * 2 = half-open (testing recovery)
 */
export declare const circuitBreakerStateGauge: Gauge<"service">;
/**
 * Circuit breaker trips total
 */
export declare const circuitBreakerTripsTotal: Counter<"service">;
/**
 * Circuit breaker recoveries total
 */
export declare const circuitBreakerRecoveriesTotal: Counter<"service">;
/**
 * Circuit breaker rejected requests total
 */
export declare const circuitBreakerRejectedTotal: Counter<"service">;
/**
 * Memory usage gauge
 */
export declare const memoryUsageBytes: Gauge<"type">;
/**
 * Error rate over time (rolling window)
 */
export declare const errorRateGauge: Gauge<"service">;
/**
 * Request latency percentiles (P50, P90, P95, P99)
 */
export declare const requestLatencyPercentiles: Summary<"service">;
/**
 * Escalations created total
 */
export declare const escalationsCreatedTotal: Counter<"tenant_id" | "reason_category">;
/**
 * Escalation approval rate
 */
export declare const escalationApprovalRateGauge: Gauge<"tenant_id">;
/**
 * Escalation resolution time
 */
export declare const escalationResolutionTimeSeconds: Histogram<"tenant_id" | "resolution">;
/**
 * Pending escalations count
 */
export declare const pendingEscalationsGauge: Gauge<"tenant_id">;
/**
 * Circuit breaker state enum values
 */
export declare const CIRCUIT_BREAKER_STATES: {
    readonly CLOSED: 0;
    readonly OPEN: 1;
    readonly HALF_OPEN: 2;
};
export type CircuitBreakerState = keyof typeof CIRCUIT_BREAKER_STATES;
/**
 * Record intent submission with all relevant metrics
 */
export declare function recordIntentSubmissionMetric(status: string, tenantId: string, intentType: string, durationSeconds?: number): void;
/**
 * Record trust score calculation
 */
export declare function recordTrustCalculationMetric(tenantId: string, entityType: string, durationSeconds: number): void;
/**
 * Record policy evaluation
 */
export declare function recordPolicyEvaluationMetric(result: 'allow' | 'deny' | 'escalate', tenantId: string, namespace: string, policyName: string, durationSeconds: number, rulesEvaluated: number): void;
/**
 * Record API request metrics
 */
export declare function recordApiRequestMetric(method: string, route: string, statusCode: number, durationSeconds: number, requestSizeBytes?: number, responseSizeBytes?: number): void;
/**
 * Update database pool metrics
 */
export declare function updateDatabasePoolMetrics(active: number, idle: number, waiting: number, total: number, maxPoolSize: number): void;
/**
 * Update Redis connection metrics
 */
export declare function updateRedisMetrics(activeConnections: number, memoryBytes?: number): void;
/**
 * Update circuit breaker state
 */
export declare function updateCircuitBreakerStateMetric(service: string, state: CircuitBreakerState): void;
/**
 * Record circuit breaker state change
 */
export declare function recordCircuitBreakerStateChangeMetric(service: string, fromState: CircuitBreakerState, toState: CircuitBreakerState): void;
/**
 * Update memory usage metrics
 */
export declare function updateMemoryMetrics(): void;
export declare function startMemoryMetricsCollection(intervalMs?: number): void;
export declare function stopMemoryMetricsCollection(): void;
//# sourceMappingURL=metrics.d.ts.map