( ctx context.Context, room *livekit.Room, participant *livekit.ParticipantInfo, clientInfo *livekit.ClientInfo, clientMeta *livekit.AnalyticsClientMeta, shouldSendEvent bool, guard *ReferenceGuard, )
| 74 | } |
| 75 | |
| 76 | func (t *telemetryService) ParticipantJoined( |
| 77 | ctx context.Context, |
| 78 | room *livekit.Room, |
| 79 | participant *livekit.ParticipantInfo, |
| 80 | clientInfo *livekit.ClientInfo, |
| 81 | clientMeta *livekit.AnalyticsClientMeta, |
| 82 | shouldSendEvent bool, |
| 83 | guard *ReferenceGuard, |
| 84 | ) { |
| 85 | t.enqueue(func() { |
| 86 | _, found := t.getOrCreateWorker( |
| 87 | ctx, |
| 88 | livekit.RoomID(room.Sid), |
| 89 | livekit.RoomName(room.Name), |
| 90 | livekit.ParticipantID(participant.Sid), |
| 91 | livekit.ParticipantIdentity(participant.Identity), |
| 92 | guard, |
| 93 | ) |
| 94 | if !found { |
| 95 | prometheus.IncrementParticipantRtcConnected(1) |
| 96 | prometheus.AddParticipant() |
| 97 | } |
| 98 | |
| 99 | if shouldSendEvent { |
| 100 | ev := newParticipantEvent(livekit.AnalyticsEventType_PARTICIPANT_JOINED, room, participant) |
| 101 | ev.ClientInfo = clientInfo |
| 102 | ev.ClientMeta = clientMeta |
| 103 | t.SendEvent(ctx, ev) |
| 104 | } |
| 105 | }) |
| 106 | } |
| 107 | |
| 108 | func (t *telemetryService) ParticipantActive( |
| 109 | ctx context.Context, |
nothing calls this directly
no test coverage detected