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:
@@ -63,11 +63,12 @@ type Stats struct {
|
||||
|
||||
// StatsWorker handles participant stats
|
||||
type StatsWorker struct {
|
||||
ctx context.Context
|
||||
t TelemetryReporter
|
||||
roomID livekit.RoomID
|
||||
roomName livekit.RoomName
|
||||
participantID livekit.ParticipantID
|
||||
ctx context.Context
|
||||
t TelemetryReporter
|
||||
roomID livekit.RoomID
|
||||
roomName livekit.RoomName
|
||||
participantID livekit.ParticipantID
|
||||
participantIdentity livekit.ParticipantIdentity
|
||||
|
||||
outgoingPerTrack map[livekit.TrackID]Stats
|
||||
incomingPerTrack map[livekit.TrackID]Stats
|
||||
@@ -82,13 +83,15 @@ func newStatsWorker(
|
||||
roomID livekit.RoomID,
|
||||
roomName livekit.RoomName,
|
||||
participantID livekit.ParticipantID,
|
||||
identity livekit.ParticipantIdentity,
|
||||
) *StatsWorker {
|
||||
s := &StatsWorker{
|
||||
ctx: ctx,
|
||||
t: t,
|
||||
roomID: roomID,
|
||||
roomName: roomName,
|
||||
participantID: participantID,
|
||||
ctx: ctx,
|
||||
t: t,
|
||||
roomID: roomID,
|
||||
roomName: roomName,
|
||||
participantID: participantID,
|
||||
participantIdentity: identity,
|
||||
|
||||
outgoingPerTrack: make(map[livekit.TrackID]Stats),
|
||||
incomingPerTrack: make(map[livekit.TrackID]Stats),
|
||||
|
||||
Reference in New Issue
Block a user