From 58822c26ab2de3250466c19cc297a3fdd8a96081 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Mon, 5 May 2025 10:44:17 +0530 Subject: [PATCH] Include clientInfo in connectivity logs. (#3638) Makes it easier for log based filtering. --- pkg/rtc/room.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/rtc/room.go b/pkg/rtc/room.go index ebcf1d6c6..e77ac0eff 100644 --- a/pkg/rtc/room.go +++ b/pkg/rtc/room.go @@ -474,7 +474,11 @@ func (r *Room) Join(participant types.LocalParticipant, requestSource routing.Me false, ) - p.GetLogger().Infow("participant active", connectionDetailsFields(infos)...) + fields := append( + connectionDetailsFields(infos), + "clientInfo", logger.Proto(p.GetClientInfo()), + ) + p.GetLogger().Infow("participant active", fields...) } else if state == livekit.ParticipantInfo_DISCONNECTED { // remove participant from room // participant should already be closed and have a close reason, so NONE is fine here @@ -706,8 +710,10 @@ func (r *Room) RemoveParticipant(identity livekit.ParticipantIdentity, pID livek r.protoProxy.MarkDirty(immediateChange) if !p.HasConnected() { - fields := append(connectionDetailsFields(p.GetICEConnectionInfo()), + fields := append( + connectionDetailsFields(p.GetICEConnectionInfo()), "reason", reason.String(), + "clientInfo", logger.Proto(p.GetClientInfo()), ) p.GetLogger().Infow("removing participant without connection", fields...) }