Store client meta on participant join (#380)

* Store client meta on participant join

capture region, time_to_connect, ip, node

Signed-off-by: shishir gowda <shishir@livekit.io>

* Update proto dep

Signed-off-by: shishir gowda <shishir@livekit.io>
This commit is contained in:
shishirng
2022-01-27 15:44:03 -05:00
committed by GitHub
parent 26eea78b54
commit 1e156025b4
7 changed files with 35 additions and 21 deletions
+2 -1
View File
@@ -285,7 +285,8 @@ func (r *RoomManager) StartSession(ctx context.Context, roomName livekit.RoomNam
// update room store with new numParticipants
updateParticipantCount()
r.telemetry.ParticipantJoined(ctx, room.Room, participant.ToProto(), pi.Client)
clientMeta := &livekit.AnalyticsClientMeta{Region: r.currentNode.Region, Node: r.currentNode.Id}
r.telemetry.ParticipantJoined(ctx, room.Room, participant.ToProto(), pi.Client, clientMeta)
participant.OnClose(func(p types.LocalParticipant, disallowedSubscriptions map[livekit.TrackID]livekit.ParticipantID) {
if err := r.roomStore.DeleteParticipant(ctx, roomName, p.Identity()); err != nil {
pLogger.Errorw("could not delete participant", err)