-
Notifications
You must be signed in to change notification settings - Fork 649
[FEATURE]: Export MCP session pool metrics to Prometheus #2118
Copy link
Copy link
Open
Labels
SHOULDP2: Important but not vital; high-value items that are not crucial for the immediate releaseP2: Important but not vital; high-value items that are not crucial for the immediate releaseenhancementNew feature or requestNew feature or requestobservabilityObservability, logging, monitoringObservability, logging, monitoringperformancePerformance related itemsPerformance related itemspythonPython / backend development (FastAPI)Python / backend development (FastAPI)
Milestone
Metadata
Metadata
Assignees
Labels
SHOULDP2: Important but not vital; high-value items that are not crucial for the immediate releaseP2: Important but not vital; high-value items that are not crucial for the immediate releaseenhancementNew feature or requestNew feature or requestobservabilityObservability, logging, monitoringObservability, logging, monitoringperformancePerformance related itemsPerformance related itemspythonPython / backend development (FastAPI)Python / backend development (FastAPI)
Type
Fields
Give feedbackNo fields configured for Feature.
Summary
The MCP session pool tracks internal metrics (
_hits,_misses,_evictions,_health_check_failures) but does not expose them to Prometheus for monitoring.Current State
Location:
mcpgateway/services/mcp_session_pool.pyThe session pool maintains these metrics internally:
These are valuable for understanding:
Proposed Solution
Add Prometheus metrics for session pool observability:
Usage Example
Grafana Dashboard Queries
Acceptance Criteria
/metricsendpointgateway_idfor per-gateway visibilityRelated
mcpgateway/metrics/From:
todo/performance-review.md- MCP session pool analysis