implement observability for room metrics (#3712)
* implement observability for room metrics * deps * test * test * Raja feedback * cleanup
This commit is contained in:
@@ -31,6 +31,8 @@ import (
|
||||
"github.com/livekit/protocol/auth"
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/protocol/logger"
|
||||
"github.com/livekit/protocol/observability"
|
||||
"github.com/livekit/protocol/observability/roomobs"
|
||||
"github.com/livekit/protocol/rpc"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/livekit/protocol/utils/guid"
|
||||
@@ -73,6 +75,7 @@ type RoomManager struct {
|
||||
rtcRestServer rpc.RTCRestServer[livekit.NodeID]
|
||||
roomStore ObjectStore
|
||||
telemetry telemetry.TelemetryService
|
||||
recorder observability.Reporter
|
||||
clientConfManager clientconfiguration.ClientConfigurationManager
|
||||
agentClient agent.Client
|
||||
agentStore AgentStore
|
||||
@@ -450,6 +453,7 @@ func (r *RoomManager) StartSession(
|
||||
Grants: pi.Grants,
|
||||
Reconnect: pi.Reconnect,
|
||||
Logger: pLogger,
|
||||
Reporter: roomobs.NewNoopParticipantSessionReporter(),
|
||||
ClientConf: clientConf,
|
||||
ClientInfo: rtc.ClientInfo{ClientInfo: pi.Client},
|
||||
Region: pi.Region,
|
||||
|
||||
@@ -470,6 +470,7 @@ func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
pLogger.Debugw("sending participant update", "participantUpdate", m)
|
||||
case *livekit.SignalResponse_RoomMoved:
|
||||
resetLogger()
|
||||
signalStats.Reset()
|
||||
roomName = livekit.RoomName(m.RoomMoved.GetRoom().GetName())
|
||||
moveRoomID := livekit.RoomID(m.RoomMoved.GetRoom().GetSid())
|
||||
if moveRoomID != "" {
|
||||
@@ -478,6 +479,8 @@ func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
participantIdentity = livekit.ParticipantIdentity(m.RoomMoved.GetParticipant().GetIdentity())
|
||||
pID = livekit.ParticipantID(m.RoomMoved.GetParticipant().GetSid())
|
||||
resolveLogger(false)
|
||||
signalStats.ResolveRoom(m.RoomMoved.GetRoom())
|
||||
signalStats.ResolveParticipant(m.RoomMoved.GetParticipant())
|
||||
pLogger.Debugw("sending room moved", "roomMoved", m)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user