metrics: allow filtering metrics (#953) (#4809)
Some checks are pending
code_lint / golangci_lint (push) Waiting to run
code_lint / mod_tidy (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run

This commit is contained in:
Alessandro Ros 2025-08-02 13:10:57 +02:00 committed by GitHub
parent 21404a6821
commit cc48fdb2b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 531 additions and 198 deletions

View file

@ -74,6 +74,9 @@ func TestMetrics(t *testing.T) {
bo := httpPullFile(t, hc, "http://localhost:9998/metrics")
require.Equal(t, `paths 0
paths_bytes_received 0
paths_bytes_sent 0
paths_readers 0
hls_muxers 0
hls_muxers_bytes_sent 0
rtsp_conns 0
@ -490,6 +493,10 @@ webrtc_sessions_rtcp_packets_sent 0
bo := httpPullFile(t, hc, "http://localhost:9998/metrics")
require.Equal(t, "paths 0\n", string(bo))
require.Equal(t, "paths 0\n"+
"paths_bytes_received 0\n"+
"paths_bytes_sent 0\n"+
"paths_readers 0\n",
string(bo))
})
}