Description
Create a /metrics endpoint that exposes basic server metrics in a simple JSON format.
🔄 Current Status
Partially Implemented: The /model/info endpoint currently provides comprehensive statistics, but a dedicated /metrics endpoint would be more appropriate for monitoring systems.
✅ Already Implemented
Current metrics available via /model/info:
- Total inference count
- Total inference time
- Average inference time
- Error count and success count
- Memory usage estimation
- Min/max inference times
- Last inference timestamp
🔄 Remaining Work
Implementation Guidance
- Extract metrics logic from
ModelStats to a separate ServerMetrics struct
- Keep existing
/model/info for model-specific statistics
- New
/metrics for server-wide metrics
- Use atomic counters for high-performance metrics collection
Estimated Difficulty
Easy - 2-3 hours (reduced due to existing metrics infrastructure)
Description
Create a
/metricsendpoint that exposes basic server metrics in a simple JSON format.🔄 Current Status
Partially Implemented: The
/model/infoendpoint currently provides comprehensive statistics, but a dedicated/metricsendpoint would be more appropriate for monitoring systems.✅ Already Implemented
Arc<Mutex<ModelStats>>/model/infoCurrent metrics available via
/model/info:🔄 Remaining Work
GET /metricsendpoint tosrc/api.rsImplementation Guidance
ModelStatsto a separateServerMetricsstruct/model/infofor model-specific statistics/metricsfor server-wide metricsEstimated Difficulty
Easy - 2-3 hours (reduced due to existing metrics infrastructure)