You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add KVM performance timing metrics and monitoring (#761)
* feat: add KVM performance timing metrics and monitoring
- Add histograms to track KVM connection setup timing:
- Device lookup time from database
- TCP connection establishment time
- WebSocket upgrade duration
- Total connection time
- Consent code wait time
- API request durations
- Add metrics for KVM data flow performance:
- Device-to-browser and browser-to-device write/send durations
- Payload size distributions
- Receive/read block times
- Create recording functions for all metrics
- Add detailed timing logs with KVM_TIMING prefix
- Update tests to handle new timing metrics
* refactor: replace manual REST endpoint instrumentation with go-gin-prometheus
Replace manual timing instrumentation in individual REST endpoints with
go-gin-prometheus middleware for automatic metrics coverage across all
HTTP endpoints.
Changes:
- Add go-gin-prometheus dependency to provide standard HTTP metrics
- Integrate Prometheus middleware in router for automatic instrumentation
- Remove manual timing code from features, KVM displays, and power endpoints
- Remove unused kvmAPIRequestSeconds metric and RecordAPIRequest function
- Clean up unused time and devices package imports
Benefits:
- Automatic metrics for ALL REST endpoints (not just 3)
- Standard HTTP metrics (duration, status codes, request/response sizes)
- Less repetitive code and improved maintainability
- Keeps all custom KVM connection and data flow metrics
Addresses reviewer feedback in PR #761
---------
Co-authored-by: Mike <michael.johanson@intel.com>
0 commit comments