Files
Tanish Desai a2880d6978 feat(prometheus): add opt-in livekit_room_included_total gauge (#5239)
Add a new gauge that counts active rooms whose name does not match a
configurable regex. This lets operators keep synthetic rooms (load
tests, health checks) out of autoscaling and dashboards, without
changing livekit_room_total.

Config:

  prometheus:
    port: 6789
    room_exclude_regex: "^(loadtest|healthcheck)-"

Behavior:
- Disabled by default. With an empty room_exclude_regex the metric is
  not registered and nothing changes.
- RE2 syntax, unanchored match.
- An invalid regex fails server startup with a clear error.
- Same node_id/node_type labels as livekit_room_total.
- livekit_room_total and the RoomStarted/RoomEnded signatures are
  unchanged. The new hooks sit next to the existing calls in
  RoomManager.

Tests cover invalid/empty patterns, include/exclude counting, the
existing metric staying unchanged, and safe no-op when disabled.
2026-11-18 15:42:44 +01:00
..