-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Is your feature request related to a problem? Please describe.
KVM connection performance bottlenecks are currently opaque, leaving us frustrated when investigating latency, consent code handling, API delays, or slow device setup. Enterprise users need fast, reliable connections and data-driven diagnostics.
Describe the solution you'd like
Add permanent and temporary telemetry using Prometheus metrics to capture precise timing for:
- Device lookup (in
interceptor.go) - Connection setup & RedirectConnect (in
interceptor.go) - WebSocket upgrade (in
redirect.go) - Device ↔ browser frame timing (see
ListenToDevice&ListenToBrowser)
Include permanent Prometheus metrics for: total connection time, device lookup latency, consent code wait time, API request latency, WebSocket upgrade duration. Temporary metrics for 2nd/3rd load timing can be captured and compared pre-/post-optimization.
Sample instrumentation points:
- [internal/usecase/devices/metrics.go](https://github.com/device-management-toolkit/console/blob/main/internal/usecase/devices/metrics. go)
- internal/usecase/devices/interceptor. go
- internal/controller/ws/v1/redirect.go
Label timing logs as KVM_TIMING for easy filtering and analysis.
Describe alternatives you've considered
Other forms of ad hoc logging, but those are less actionable for optimization and long-term improvements.
Additional context
Applies To: Enterprise (console backend)
Expected Benefit:
- Enable data-driven optimization and regression detection
- Identify bottlenecks (consent codes, API latency, connection setup)
- Provide baseline for future improvements
Sample code references for implementation:
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status