-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Overview
MCPcat currently supports OTLP, Datadog, and Sentry exporters for telemetry. Adding a Prometheus exporter would allow users to integrate with one of the most popular open-source monitoring systems.
Current State
The telemetry system has a clean exporter interface that makes it easy to add new exporters. Existing exporters (OTLP, Datadog, Sentry) provide good examples of the implementation pattern.
Requirements
Create a new Prometheus exporter that:
-
Converts MCP events to Prometheus metrics
- Counter for total events
- Histogram for event duration
- Labels for event type, tool name, error status
-
Exposes metrics endpoint
- HTTP endpoint for Prometheus scraping
- Configurable port and path
-
Follows existing patterns
- Extends the base Exporter class
- Integrates with TelemetryManager
- Handles errors gracefully
Why This Matters
- Prometheus is widely adopted in the industry
- Many organizations already have Prometheus infrastructure
- Enables integration with Grafana for visualization
- Provides an open-source alternative to commercial solutions
- Complements existing exporters
Acceptance Criteria
- New PrometheusExporter class in exporters module
- Converts events to appropriate metric types
- Exposes metrics on configurable HTTP endpoint
- Includes proper labels and metadata
- Handles high-cardinality data appropriately
- Includes unit tests
- Updates documentation with configuration examples
Getting Started
- Review the base Exporter interface
- Look at existing exporters for patterns
- Research Prometheus Python client library
- Start with basic counter metrics
- Add histogram for duration tracking
- Implement HTTP server for metrics endpoint
Configuration Example
The exporter should support configuration like:
exporters:
prometheus:
type: prometheus
port: 9090
path: /metrics
prefix: mcpcat_
Notes
- Consider metric cardinality to avoid performance issues
- Use standard Prometheus naming conventions
- Think about which event fields make good labels
- Keep the implementation simple initially
- This could later be extended with custom metrics
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed