Skip to content

Add Performance Timing Instrumentation #756

@nmgaston

Description

@nmgaston

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:

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:

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

enhancementNew feature or request

Projects

Status

In Review

Status

Q1 2026 (Current)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions