Send connection type to telemetry (#964)
* Send connection type to telemetry When connected, determine how the participant's primary connection is connected and report it in ParticipantActive event. * address feedback * fixed case where prflx is reported instead of relay * incorporate comments
This commit is contained in:
+4
-1
@@ -251,7 +251,10 @@ func (r *Room) Join(participant types.LocalParticipant, opts *ParticipantOptions
|
||||
// start the workers once connectivity is established
|
||||
p.Start()
|
||||
|
||||
r.telemetry.ParticipantActive(context.Background(), r.ToProto(), p.ToProto(), &livekit.AnalyticsClientMeta{ClientConnectTime: uint32(time.Since(p.ConnectedAt()).Milliseconds())})
|
||||
r.telemetry.ParticipantActive(context.Background(), r.ToProto(), p.ToProto(), &livekit.AnalyticsClientMeta{
|
||||
ClientConnectTime: uint32(time.Since(p.ConnectedAt()).Milliseconds()),
|
||||
ConnectionType: string(p.GetICEConnectionType()),
|
||||
})
|
||||
} else if state == livekit.ParticipantInfo_DISCONNECTED {
|
||||
// remove participant from room
|
||||
go r.RemoveParticipant(p.Identity(), types.ParticipantCloseReasonStateDisconnected)
|
||||
|
||||
Reference in New Issue
Block a user