v0.5: WHIP Prometheus metrics — replace no-op recordRequest placeholder #22

Closed
opened 2026-05-10 21:02:53 -04:00 by zgaetano · 0 comments
Owner

Summary

WHIPHandler.recordRequest is currently a no-op placeholder (issue noted in commit comment). Wire in real Prometheus counters and histograms at parity with WHEP.

Acceptance criteria

  • Add whipRequests CounterVec and whipRequestDuration HistogramVec to webrtcMetrics
  • Add met *webrtcMetrics field to WHIPHandler; expose WHIPHandler.SetMetrics(met *webrtcMetrics)
  • Replace the fmt.Sprintf no-op in recordRequest with real counter/histogram observations
  • Add WHIPHandler.trackICE goroutine for ingest ICE establishment timing (reuses existing iceEstablishment and iceFailures labels)
  • Add WHIPHandler.Stats() returning active publisher counts (for snapshot collector)
  • Remove unused "fmt" import from whip_handler.go
  • Tests in whip_handler_test.go: verify SetMetrics doesn't panic, Stats returns 0 on empty handler
## Summary `WHIPHandler.recordRequest` is currently a no-op placeholder (issue noted in commit comment). Wire in real Prometheus counters and histograms at parity with WHEP. ## Acceptance criteria - Add `whipRequests` CounterVec and `whipRequestDuration` HistogramVec to `webrtcMetrics` - Add `met *webrtcMetrics` field to `WHIPHandler`; expose `WHIPHandler.SetMetrics(met *webrtcMetrics)` - Replace the `fmt.Sprintf` no-op in `recordRequest` with real counter/histogram observations - Add `WHIPHandler.trackICE` goroutine for ingest ICE establishment timing (reuses existing `iceEstablishment` and `iceFailures` labels) - Add `WHIPHandler.Stats()` returning active publisher counts (for snapshot collector) - Remove unused `"fmt"` import from `whip_handler.go` - Tests in `whip_handler_test.go`: verify `SetMetrics` doesn't panic, Stats returns 0 on empty handler
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: zgaetano/datarhei-dragonfork-core#22
No description provided.