@@ -765,6 +765,45 @@ OTEL_BSP_MAX_QUEUE_SIZE=2048
765765OTEL_BSP_MAX_EXPORT_BATCH_SIZE = 512
766766OTEL_BSP_SCHEDULE_DELAY = 5000
767767
768+ # Prometheus Metrics Configuration
769+ # Enable Prometheus-compatible metrics exposition for monitoring and alerting
770+ # Options: true (default), false
771+ # When true: Exposes metrics at /metrics/prometheus in Prometheus format
772+ # When false: Returns HTTP 503 on metrics endpoint
773+ ENABLE_METRICS = true
774+
775+ # Comma-separated regex patterns for endpoints to exclude from metrics collection
776+ # Use this to avoid high-cardinality issues with dynamic paths or reduce overhead
777+ # Examples:
778+ # - Exclude SSE endpoints: /servers/.*/sse
779+ # - Exclude static files: /static/.*
780+ # - Exclude health checks: .*health.*
781+ # - Multiple patterns: /servers/.*/sse,/static/.*,.*health.*
782+ # Default: "" (no exclusions)
783+ METRICS_EXCLUDED_HANDLERS =
784+
785+ # Prometheus metrics namespace (prefix for all metric names)
786+ # Used to group metrics by application or organization
787+ # Example: mycompany_gateway_http_requests_total
788+ # Default: "default"
789+ METRICS_NAMESPACE = default
790+
791+ # Prometheus metrics subsystem (secondary prefix for metric names)
792+ # Used for further categorization within namespace
793+ # Example: mycompany_api_http_requests_total (if subsystem=api)
794+ # Default: "" (no subsystem)
795+ METRICS_SUBSYSTEM =
796+
797+ # Custom static labels for app_info gauge metric
798+ # Format: comma-separated "key=value" pairs (low-cardinality values only)
799+ # WARNING: Never use high-cardinality values (user IDs, request IDs, timestamps)
800+ # Examples:
801+ # - Single label: environment=production
802+ # - Multiple labels: environment=production,region=us-east-1,team=platform
803+ # - K8s example: cluster=prod-us-east,namespace=mcp-gateway
804+ # Default: "" (no custom labels)
805+ METRICS_CUSTOM_LABELS =
806+
768807# Plugin Framework Configuration
769808# Enable the plugin system for extending gateway functionality
770809# Options: true, false (default)
0 commit comments