mirror of
https://github.com/livekit/livekit.git
synced 2026-11-23 02:29:22 +00:00
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.