Rename log field "pID" to "participantID" for consistency (#4365)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Paul Wells
2026-03-15 04:32:02 -07:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 77fc74a727
commit c8bb2578be
7 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -473,7 +473,7 @@ func (r *Room) Join(
r.logger.Debugw( r.logger.Debugw(
"new participant joined", "new participant joined",
"pID", participant.ID(), "participantID", participant.ID(),
"participant", participant.Identity(), "participant", participant.Identity(),
"clientInfo", logger.Proto(participant.GetClientInfo()), "clientInfo", logger.Proto(participant.GetClientInfo()),
"options", opts, "options", opts,
+1 -1
View File
@@ -122,7 +122,7 @@ func LoggerWithParticipant(l logger.Logger, identity livekit.ParticipantIdentity
values = append(values, "participant", identity) values = append(values, "participant", identity)
} }
if sid != "" { if sid != "" {
values = append(values, "pID", sid) values = append(values, "participantID", sid)
} }
values = append(values, "remote", isRemote) values = append(values, "remote", isRemote)
// enable sampling per participant // enable sampling per participant
+1 -1
View File
@@ -308,7 +308,7 @@ func (s *RTCService) serve(w http.ResponseWriter, r *http.Request, needsJoinRequ
"room", roomName, "room", roomName,
"roomID", roomID, "roomID", roomID,
"participant", participantIdentity, "participant", participantIdentity,
"pID", pID, "participantID", pID,
} }
} }
+3 -3
View File
@@ -358,7 +358,7 @@ func (s *WHIPService) iceTrickle(
"method", "ice-trickle", "method", "ice-trickle",
"room", roomName, "room", roomName,
"participant", participantIdentity, "participant", participantIdentity,
"pID", pID, "participantID", pID,
"sdpFragment", sdpFragment, "sdpFragment", sdpFragment,
"status", http.StatusNoContent, "status", http.StatusNoContent,
) )
@@ -410,7 +410,7 @@ func (s *WHIPService) iceRestart(
"method", "ice-restart", "method", "ice-restart",
"room", roomName, "room", roomName,
"participant", participantIdentity, "participant", participantIdentity,
"pID", pID, "participantID", pID,
"sdpFragment", sdpFragment, "sdpFragment", sdpFragment,
"status", http.StatusNoContent, "status", http.StatusNoContent,
"res", logger.Proto(res), "res", logger.Proto(res),
@@ -514,7 +514,7 @@ func (s *WHIPService) handleParticipantDelete(w http.ResponseWriter, r *http.Req
sutils.GetLogger(r.Context()).Infow( sutils.GetLogger(r.Context()).Infow(
"API WHIP.Delete", "API WHIP.Delete",
"participant", claims.Identity, "participant", claims.Identity,
"pID", r.PathValue("participant_id"), "participantID", r.PathValue("participant_id"),
"room", roomName, "room", roomName,
"status", http.StatusOK, "status", http.StatusOK,
) )
+1 -1
View File
@@ -198,7 +198,7 @@ func (t *telemetryService) ParticipantLeft(ctx context.Context,
"room", room.Name, "room", room.Name,
"roomID", room.Sid, "roomID", room.Sid,
"participant", participant.Identity, "participant", participant.Identity,
"pID", participant.Sid, "participantID", participant.Sid,
"worker", worker, "worker", worker,
) )
} }
+1 -1
View File
@@ -207,7 +207,7 @@ func (s *StatsWorker) MarshalLogObject(e zapcore.ObjectEncoder) error {
e.AddString("room", string(s.roomName)) e.AddString("room", string(s.roomName))
e.AddString("roomID", string(s.roomID)) e.AddString("roomID", string(s.roomID))
e.AddString("participant", string(s.participantIdentity)) e.AddString("participant", string(s.participantIdentity))
e.AddString("pID", string(s.participantID)) e.AddString("participantID", string(s.participantID))
e.AddBool("isConnected", s.isConnected) e.AddBool("isConnected", s.isConnected)
e.AddTime("closedAt", s.closedAt) e.AddTime("closedAt", s.closedAt)
e.AddObject("refCount", s.refCount) e.AddObject("refCount", s.refCount)
+8 -8
View File
@@ -334,7 +334,7 @@ func NewRTCClient(conn *websocket.Conn, useSinglePeerConnection bool, opts *Opti
}) })
publisherHandler.OnOfferCalls(c.onOffer) publisherHandler.OnOfferCalls(c.onOffer)
publisherHandler.OnFullyEstablishedCalls(func() { publisherHandler.OnFullyEstablishedCalls(func() {
logger.Debugw("publisher fully established", "participant", c.localParticipant.Identity, "pID", c.localParticipant.Sid) logger.Debugw("publisher fully established", "participant", c.localParticipant.Identity, "participantID", c.localParticipant.Sid)
c.publisherFullyEstablished.Store(true) c.publisherFullyEstablished.Store(true)
}) })
@@ -426,7 +426,7 @@ func NewRTCClient(conn *websocket.Conn, useSinglePeerConnection bool, opts *Opti
} }
}) })
subscriberHandler.OnFullyEstablishedCalls(func() { subscriberHandler.OnFullyEstablishedCalls(func() {
logger.Debugw("subscriber fully established", "participant", c.localParticipant.Identity, "pID", c.localParticipant.Sid) logger.Debugw("subscriber fully established", "participant", c.localParticipant.Identity, "participantID", c.localParticipant.Sid)
c.subscriberFullyEstablished.Store(true) c.subscriberFullyEstablished.Store(true)
}) })
subscriberHandler.OnAnswerCalls(func(answer webrtc.SessionDescription, answerId uint32, _midToTrackID map[string]string) error { subscriberHandler.OnAnswerCalls(func(answer webrtc.SessionDescription, answerId uint32, _midToTrackID map[string]string) error {
@@ -632,7 +632,7 @@ func (c *RTCClient) handleSignalResponse(res *livekit.SignalResponse) error {
livekit.ParticipantID(publishedDataTrack.PublisherSid), livekit.ParticipantID(publishedDataTrack.PublisherSid),
uint16(handle), uint16(handle),
livekit.TrackID(publishedDataTrack.TrackSid), livekit.TrackID(publishedDataTrack.TrackSid),
logger.GetLogger().WithValues("participant", c.localParticipant.Identity, "pID", c.localParticipant.Sid), logger.GetLogger().WithValues("participant", c.localParticipant.Identity, "participantID", c.localParticipant.Sid),
) )
} }
} }
@@ -860,7 +860,7 @@ func (c *RTCClient) AddTrack(track *webrtc.TrackLocalStaticSample, path string,
logger.Errorw( logger.Errorw(
"add track failed", err, "add track failed", err,
"participant", c.localParticipant.Identity, "participant", c.localParticipant.Identity,
"pID", c.localParticipant.Sid, "participantID", c.localParticipant.Sid,
"trackID", track.ID(), "trackID", track.ID(),
) )
return return
@@ -1209,7 +1209,7 @@ func (c *RTCClient) processRemoteTrack(track *webrtc.TrackRemote) {
logger.Infow( logger.Infow(
"client caching track", "client caching track",
"participant", c.localParticipant.Identity, "participant", c.localParticipant.Identity,
"pID", c.ID(), "participantID", c.ID(),
"codec", track.Codec(), "codec", track.Codec(),
"ssrc", track.SSRC(), "ssrc", track.SSRC(),
) )
@@ -1230,7 +1230,7 @@ func (c *RTCClient) processRemoteTrack(track *webrtc.TrackRemote) {
logger.Infow( logger.Infow(
"client added track", "client added track",
"participant", c.localParticipant.Identity, "participant", c.localParticipant.Identity,
"pID", c.ID(), "participantID", c.ID(),
"publisherID", publisherID, "publisherID", publisherID,
"trackID", trackID, "trackID", trackID,
"codec", track.Codec(), "codec", track.Codec(),
@@ -1253,7 +1253,7 @@ func (c *RTCClient) processRemoteTrack(track *webrtc.TrackRemote) {
logger.Infow( logger.Infow(
"client track removed", "client track removed",
"participant", c.localParticipant.Identity, "participant", c.localParticipant.Identity,
"pID", c.ID(), "participantID", c.ID(),
"publisherID", publisherID, "publisherID", publisherID,
"trackID", trackID, "trackID", trackID,
"codec", track.Codec(), "codec", track.Codec(),
@@ -1274,7 +1274,7 @@ func (c *RTCClient) processRemoteTrack(track *webrtc.TrackRemote) {
logger.Infow( logger.Infow(
"consumed from participant", "consumed from participant",
"participant", c.localParticipant.Identity, "participant", c.localParticipant.Identity,
"pID", c.ID(), "participantID", c.ID(),
"publisherID", publisherID, "publisherID", publisherID,
"trackID", trackID, "trackID", trackID,
"size", numBytes, "size", numBytes,