Telemetry and webhook improvements. (#535)

* Telemetry and webhook improvements.

* avoid blocking on telemetry channel - increase channel size and drop when full
* send ParticipantJoined webhook when fully joined (i.e. on ParticipantActive)
* send TrackPublished & TrackUnpublished webhooks
* increase number of parallel webhook workers to 50

* update protocol
This commit is contained in:
David Zhao
2022-03-18 23:20:33 -07:00
committed by GitHub
parent 5a9da8bee2
commit f14c452f8c
14 changed files with 213 additions and 126 deletions
+2
View File
@@ -1,6 +1,7 @@
package rtc
import (
"context"
"math"
"sort"
"sync"
@@ -214,6 +215,7 @@ func (r *Room) Join(participant types.LocalParticipant, opts *ParticipantOptions
// start the workers once connectivity is established
p.Start()
r.telemetry.ParticipantActive(context.Background(), r.Room, p.ToProto(), &livekit.AnalyticsClientMeta{ClientConnectTime: uint32(time.Since(p.ConnectedAt()).Milliseconds())})
} else if state == livekit.ParticipantInfo_DISCONNECTED {
// remove participant from room
go r.RemoveParticipant(p.Identity())