Analytics events + stats (#187)

* events

* bump

* update incoming stats

* publisher stats

* outgoing rtcp

* stats

* remove unnecessary struct

* merge mediaTrack

* put comment back
This commit is contained in:
David Colburn
2021-11-12 16:36:10 -06:00
committed by GitHub
parent 6500ce262d
commit 92838d75a8
12 changed files with 414 additions and 160 deletions
+11 -11
View File
@@ -75,15 +75,15 @@ func IncrementBytes(direction Direction, count uint64) {
}
}
func IncrementNack(direction Direction) {
promNackTotal.WithLabelValues(string(direction)).Add(1)
atomic.AddUint64(&atomicNackTotal, 1)
}
func IncrementPLI(direction Direction) {
promPliTotal.WithLabelValues(string(direction)).Add(1)
}
func IncrementFIR(direction Direction) {
promFirTotal.WithLabelValues(string(direction)).Add(1)
func IncrementRTCP(direction Direction, nack, pli, fir int32) {
if nack > 0 {
promNackTotal.WithLabelValues(string(direction)).Add(float64(nack))
atomic.AddUint64(&atomicNackTotal, uint64(nack))
}
if pli > 0 {
promPliTotal.WithLabelValues(string(direction)).Add(float64(pli))
}
if fir > 0 {
promFirTotal.WithLabelValues(string(direction)).Add(float64(fir))
}
}