Add sdk lable to session start time and participant join (#4885)

This commit is contained in:
cnderrauber
2026-09-21 13:14:36 +08:00
committed by GitHub
parent d5c691836f
commit 885c869ffa
5 changed files with 32 additions and 32 deletions
+8 -8
View File
@@ -306,7 +306,7 @@ func (r *RoomManager) StartSession(
room, err := r.getOrCreateRoom(ctx, createRoom)
if err != nil {
if pi.Identity != "" {
prometheus.IncrementParticipantRtcCanceled(1, false)
prometheus.IncrementParticipantRtcCanceled(1, false, pi.Client.GetSdk())
}
return err
}
@@ -359,7 +359,7 @@ func (r *RoomManager) StartSession(
Leave: leave,
},
})
prometheus.IncrementParticipantRtcCanceled(1, participant.IsWarpEnabled())
prometheus.IncrementParticipantRtcCanceled(1, participant.IsWarpEnabled(), participant.GetClientInfo().GetSdk())
return errors.New("could not restart closed participant")
}
@@ -383,7 +383,7 @@ func (r *RoomManager) StartSession(
pi.ReconnectReason,
); err != nil {
participant.GetLogger().Warnw("could not resume participant", err)
prometheus.IncrementParticipantRtcCanceled(1, participant.IsWarpEnabled())
prometheus.IncrementParticipantRtcCanceled(1, participant.IsWarpEnabled(), participant.GetClientInfo().GetSdk())
return err
}
r.telemetry.ParticipantResumed(ctx, room.ToProto(), participant.ToProto(), r.currentNode.NodeID(), pi.ReconnectReason)
@@ -419,7 +419,7 @@ func (r *RoomManager) StartSession(
Leave: leave,
},
})
prometheus.IncrementParticipantRtcCanceled(1, false)
prometheus.IncrementParticipantRtcCanceled(1, false, pi.Client.GetSdk())
return errors.New("could not restart participant")
}
@@ -545,7 +545,7 @@ func (r *RoomManager) StartSession(
EnableWarp: enableWarp,
})
if err != nil {
prometheus.IncrementParticipantRtcCanceled(1, enableWarp)
prometheus.IncrementParticipantRtcCanceled(1, enableWarp, pi.Client.GetSdk())
return err
}
iceConfig := r.setIceConfig(room.Name(), participant)
@@ -561,7 +561,7 @@ func (r *RoomManager) StartSession(
if err = room.Join(participant, requestSource, &opts, iceServers); err != nil {
pLogger.Errorw("could not join room", err)
_ = participant.Close(true, types.ParticipantCloseReasonJoinFailed, false)
prometheus.IncrementParticipantRtcCanceled(1, enableWarp)
prometheus.IncrementParticipantRtcCanceled(1, enableWarp, pi.Client.GetSdk())
return err
}
@@ -573,7 +573,7 @@ func (r *RoomManager) StartSession(
participantServerClosers.Close()
pLogger.Errorw("could not join register participant topic", err)
_ = participant.Close(true, types.ParticipantCloseReasonMessageBusFailed, false)
prometheus.IncrementParticipantRtcCanceled(1, enableWarp)
prometheus.IncrementParticipantRtcCanceled(1, enableWarp, pi.Client.GetSdk())
return err
}
@@ -584,7 +584,7 @@ func (r *RoomManager) StartSession(
participantServerClosers.Close()
pLogger.Errorw("could not join register participant topic for rtc rest participant server", err)
_ = participant.Close(true, types.ParticipantCloseReasonMessageBusFailed, false)
prometheus.IncrementParticipantRtcCanceled(1, enableWarp)
prometheus.IncrementParticipantRtcCanceled(1, enableWarp, pi.Client.GetSdk())
return err
}
}