Add ParticipantActive telemetry method (#411)

* Add ParticipantActive telemetry method

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

* fix test

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

* Update go mod

Signed-off-by: shishir gowda <shishir@livekit.io>
This commit is contained in:
shishirng
2022-02-07 17:23:39 -05:00
committed by GitHub
parent 81521f80db
commit 32b56e0fd6
5 changed files with 70 additions and 3 deletions
@@ -219,3 +219,16 @@ func (t *telemetryServiceInternal) notifyEvent(ctx context.Context, event *livek
}
})
}
func (t *telemetryServiceInternal) ParticipantActive(ctx context.Context, participantID livekit.ParticipantID, clientMeta *livekit.AnalyticsClientMeta) {
roomID, roomName := t.getRoomDetails(participantID)
t.analytics.SendEvent(ctx, &livekit.AnalyticsEvent{
Type: livekit.AnalyticsEventType_PARTICIPANT_ACTIVE,
Timestamp: timestamppb.Now(),
RoomId: string(roomID),
ParticipantId: string(participantID),
Room: &livekit.Room{Name: string(roomName)},
ClientMeta: clientMeta,
})
}