diff --git a/pkg/routing/routingfakes/fake_message_sink.go b/pkg/routing/routingfakes/fake_message_sink.go index 4be07860..6d24c186 100644 --- a/pkg/routing/routingfakes/fake_message_sink.go +++ b/pkg/routing/routingfakes/fake_message_sink.go @@ -4,8 +4,8 @@ package routingfakes import ( "sync" - "github.com/stoatchat/livekit-server/pkg/routing" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/routing" "google.golang.org/protobuf/proto" ) diff --git a/pkg/routing/routingfakes/fake_message_source.go b/pkg/routing/routingfakes/fake_message_source.go index 40b11a4f..3e8af785 100644 --- a/pkg/routing/routingfakes/fake_message_source.go +++ b/pkg/routing/routingfakes/fake_message_source.go @@ -4,8 +4,8 @@ package routingfakes import ( "sync" - "github.com/stoatchat/livekit-server/pkg/routing" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/routing" "google.golang.org/protobuf/proto" ) diff --git a/pkg/routing/routingfakes/fake_room_manager_client.go b/pkg/routing/routingfakes/fake_room_manager_client.go index 11ec4e93..b8d7d82f 100644 --- a/pkg/routing/routingfakes/fake_room_manager_client.go +++ b/pkg/routing/routingfakes/fake_room_manager_client.go @@ -5,9 +5,9 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/routing" "github.com/livekit/protocol/livekit" "github.com/livekit/psrpc" + "github.com/stoatchat/livekit-server/pkg/routing" ) type FakeRoomManagerClient struct { diff --git a/pkg/routing/routingfakes/fake_router.go b/pkg/routing/routingfakes/fake_router.go index eb20fdeb..56cbf287 100644 --- a/pkg/routing/routingfakes/fake_router.go +++ b/pkg/routing/routingfakes/fake_router.go @@ -5,8 +5,8 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/routing" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/routing" ) type FakeRouter struct { diff --git a/pkg/routing/routingfakes/fake_signal_client.go b/pkg/routing/routingfakes/fake_signal_client.go index 08beebaa..1d5df0a1 100644 --- a/pkg/routing/routingfakes/fake_signal_client.go +++ b/pkg/routing/routingfakes/fake_signal_client.go @@ -5,8 +5,8 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/routing" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/routing" ) type FakeSignalClient struct { diff --git a/pkg/rtc/room.go b/pkg/rtc/room.go index 5fb3311c..fa36619b 100644 --- a/pkg/rtc/room.go +++ b/pkg/rtc/room.go @@ -292,7 +292,7 @@ func NewRoom( r.protoRoom.CreationTime = now.Unix() r.protoRoom.CreationTimeMs = now.UnixMilli() } - r.protoProxy = utils.NewProtoProxy(roomUpdateInterval, r.updateProto) + r.protoProxy = utils.NewProtoProxy(roomUpdateInterval, r.UpdateProto) r.createAgentDispatchesFromRoomAgent() @@ -1450,7 +1450,7 @@ func (r *Room) sendSpeakerChanges(speakers []*livekit.SpeakerInfo) { } } -func (r *Room) updateProto() *livekit.Room { +func (r *Room) UpdateProto() *livekit.Room { r.lock.RLock() room := utils.CloneProto(r.protoRoom) r.lock.RUnlock() diff --git a/pkg/rtc/transport/transportfakes/fake_handler.go b/pkg/rtc/transport/transportfakes/fake_handler.go index 7146fa49..7dd091cb 100644 --- a/pkg/rtc/transport/transportfakes/fake_handler.go +++ b/pkg/rtc/transport/transportfakes/fake_handler.go @@ -4,11 +4,11 @@ package transportfakes import ( "sync" + "github.com/livekit/protocol/livekit" + webrtc "github.com/pion/webrtc/v4" "github.com/stoatchat/livekit-server/pkg/rtc/transport" "github.com/stoatchat/livekit-server/pkg/rtc/types" "github.com/stoatchat/livekit-server/pkg/sfu/streamallocator" - "github.com/livekit/protocol/livekit" - webrtc "github.com/pion/webrtc/v4" ) type FakeHandler struct { diff --git a/pkg/rtc/types/typesfakes/fake_local_media_track.go b/pkg/rtc/types/typesfakes/fake_local_media_track.go index 5ae1e780..70365efc 100644 --- a/pkg/rtc/types/typesfakes/fake_local_media_track.go +++ b/pkg/rtc/types/typesfakes/fake_local_media_track.go @@ -4,11 +4,11 @@ package typesfakes import ( "sync" + "github.com/livekit/protocol/livekit" + "github.com/livekit/protocol/logger" "github.com/stoatchat/livekit-server/pkg/rtc/types" "github.com/stoatchat/livekit-server/pkg/sfu" "github.com/stoatchat/livekit-server/pkg/sfu/mime" - "github.com/livekit/protocol/livekit" - "github.com/livekit/protocol/logger" ) type FakeLocalMediaTrack struct { diff --git a/pkg/rtc/types/typesfakes/fake_local_participant.go b/pkg/rtc/types/typesfakes/fake_local_participant.go index 2c6259b0..1cc29e96 100644 --- a/pkg/rtc/types/typesfakes/fake_local_participant.go +++ b/pkg/rtc/types/typesfakes/fake_local_participant.go @@ -5,12 +5,6 @@ import ( "sync" "time" - "github.com/stoatchat/livekit-server/pkg/routing" - "github.com/stoatchat/livekit-server/pkg/rtc/types" - "github.com/stoatchat/livekit-server/pkg/sfu" - "github.com/stoatchat/livekit-server/pkg/sfu/buffer" - "github.com/stoatchat/livekit-server/pkg/sfu/pacer" - "github.com/stoatchat/livekit-server/pkg/telemetry" "github.com/livekit/protocol/auth" "github.com/livekit/protocol/livekit" "github.com/livekit/protocol/logger" @@ -18,6 +12,12 @@ import ( "github.com/livekit/protocol/utils" "github.com/pion/rtcp" webrtc "github.com/pion/webrtc/v4" + "github.com/stoatchat/livekit-server/pkg/routing" + "github.com/stoatchat/livekit-server/pkg/rtc/types" + "github.com/stoatchat/livekit-server/pkg/sfu" + "github.com/stoatchat/livekit-server/pkg/sfu/buffer" + "github.com/stoatchat/livekit-server/pkg/sfu/pacer" + "github.com/stoatchat/livekit-server/pkg/telemetry" "google.golang.org/protobuf/proto" ) diff --git a/pkg/rtc/types/typesfakes/fake_local_participant_helper.go b/pkg/rtc/types/typesfakes/fake_local_participant_helper.go index 789f21ad..a196f93d 100644 --- a/pkg/rtc/types/typesfakes/fake_local_participant_helper.go +++ b/pkg/rtc/types/typesfakes/fake_local_participant_helper.go @@ -4,8 +4,8 @@ package typesfakes import ( "sync" - "github.com/stoatchat/livekit-server/pkg/rtc/types" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/rtc/types" ) type FakeLocalParticipantHelper struct { diff --git a/pkg/rtc/types/typesfakes/fake_media_track.go b/pkg/rtc/types/typesfakes/fake_media_track.go index 7f625a6d..b2569c09 100644 --- a/pkg/rtc/types/typesfakes/fake_media_track.go +++ b/pkg/rtc/types/typesfakes/fake_media_track.go @@ -4,11 +4,11 @@ package typesfakes import ( "sync" + "github.com/livekit/protocol/livekit" + "github.com/livekit/protocol/logger" "github.com/stoatchat/livekit-server/pkg/rtc/types" "github.com/stoatchat/livekit-server/pkg/sfu" "github.com/stoatchat/livekit-server/pkg/sfu/mime" - "github.com/livekit/protocol/livekit" - "github.com/livekit/protocol/logger" ) type FakeMediaTrack struct { diff --git a/pkg/rtc/types/typesfakes/fake_participant.go b/pkg/rtc/types/typesfakes/fake_participant.go index 3917fdfd..72b75e97 100644 --- a/pkg/rtc/types/typesfakes/fake_participant.go +++ b/pkg/rtc/types/typesfakes/fake_participant.go @@ -5,9 +5,9 @@ import ( "sync" "time" - "github.com/stoatchat/livekit-server/pkg/rtc/types" "github.com/livekit/protocol/livekit" "github.com/livekit/protocol/utils" + "github.com/stoatchat/livekit-server/pkg/rtc/types" ) type FakeParticipant struct { diff --git a/pkg/rtc/types/typesfakes/fake_room.go b/pkg/rtc/types/typesfakes/fake_room.go index 59df5765..3e254c17 100644 --- a/pkg/rtc/types/typesfakes/fake_room.go +++ b/pkg/rtc/types/typesfakes/fake_room.go @@ -4,8 +4,8 @@ package typesfakes import ( "sync" - "github.com/stoatchat/livekit-server/pkg/rtc/types" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/rtc/types" ) type FakeRoom struct { diff --git a/pkg/rtc/types/typesfakes/fake_subscribed_track.go b/pkg/rtc/types/typesfakes/fake_subscribed_track.go index 7fd0aa62..d186a6e7 100644 --- a/pkg/rtc/types/typesfakes/fake_subscribed_track.go +++ b/pkg/rtc/types/typesfakes/fake_subscribed_track.go @@ -4,10 +4,10 @@ package typesfakes import ( "sync" - "github.com/stoatchat/livekit-server/pkg/rtc/types" - "github.com/stoatchat/livekit-server/pkg/sfu" "github.com/livekit/protocol/livekit" webrtc "github.com/pion/webrtc/v4" + "github.com/stoatchat/livekit-server/pkg/rtc/types" + "github.com/stoatchat/livekit-server/pkg/sfu" ) type FakeSubscribedTrack struct { diff --git a/pkg/service/servicefakes/fake_agent_store.go b/pkg/service/servicefakes/fake_agent_store.go index a8d0eb76..001d7817 100644 --- a/pkg/service/servicefakes/fake_agent_store.go +++ b/pkg/service/servicefakes/fake_agent_store.go @@ -5,8 +5,8 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/service" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/service" ) type FakeAgentStore struct { diff --git a/pkg/service/servicefakes/fake_egress_store.go b/pkg/service/servicefakes/fake_egress_store.go index f417da04..7fcca783 100644 --- a/pkg/service/servicefakes/fake_egress_store.go +++ b/pkg/service/servicefakes/fake_egress_store.go @@ -5,8 +5,8 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/service" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/service" ) type FakeEgressStore struct { diff --git a/pkg/service/servicefakes/fake_ingress_store.go b/pkg/service/servicefakes/fake_ingress_store.go index da6a40b8..2c3f5a85 100644 --- a/pkg/service/servicefakes/fake_ingress_store.go +++ b/pkg/service/servicefakes/fake_ingress_store.go @@ -5,8 +5,8 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/service" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/service" ) type FakeIngressStore struct { diff --git a/pkg/service/servicefakes/fake_ioclient.go b/pkg/service/servicefakes/fake_ioclient.go index c8a98396..f063d0e5 100644 --- a/pkg/service/servicefakes/fake_ioclient.go +++ b/pkg/service/servicefakes/fake_ioclient.go @@ -5,9 +5,9 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/service" "github.com/livekit/protocol/livekit" "github.com/livekit/protocol/rpc" + "github.com/stoatchat/livekit-server/pkg/service" "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/pkg/service/servicefakes/fake_object_store.go b/pkg/service/servicefakes/fake_object_store.go index 6481efd9..b7abcbc0 100644 --- a/pkg/service/servicefakes/fake_object_store.go +++ b/pkg/service/servicefakes/fake_object_store.go @@ -6,8 +6,8 @@ import ( "sync" "time" - "github.com/stoatchat/livekit-server/pkg/service" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/service" ) type FakeObjectStore struct { diff --git a/pkg/service/servicefakes/fake_room_allocator.go b/pkg/service/servicefakes/fake_room_allocator.go index 4b1fc70c..87e5dbf6 100644 --- a/pkg/service/servicefakes/fake_room_allocator.go +++ b/pkg/service/servicefakes/fake_room_allocator.go @@ -5,8 +5,8 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/service" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/service" ) type FakeRoomAllocator struct { diff --git a/pkg/service/servicefakes/fake_service_store.go b/pkg/service/servicefakes/fake_service_store.go index 5b591813..775a122d 100644 --- a/pkg/service/servicefakes/fake_service_store.go +++ b/pkg/service/servicefakes/fake_service_store.go @@ -5,8 +5,8 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/service" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/service" ) type FakeServiceStore struct { diff --git a/pkg/service/servicefakes/fake_session_handler.go b/pkg/service/servicefakes/fake_session_handler.go index 6937147e..2410c362 100644 --- a/pkg/service/servicefakes/fake_session_handler.go +++ b/pkg/service/servicefakes/fake_session_handler.go @@ -5,10 +5,10 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/routing" - "github.com/stoatchat/livekit-server/pkg/service" "github.com/livekit/protocol/livekit" "github.com/livekit/protocol/logger" + "github.com/stoatchat/livekit-server/pkg/routing" + "github.com/stoatchat/livekit-server/pkg/service" ) type FakeSessionHandler struct { diff --git a/pkg/service/servicefakes/fake_sipstore.go b/pkg/service/servicefakes/fake_sipstore.go index fe7a9a99..c3d4ca02 100644 --- a/pkg/service/servicefakes/fake_sipstore.go +++ b/pkg/service/servicefakes/fake_sipstore.go @@ -5,8 +5,8 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/service" "github.com/livekit/protocol/livekit" + "github.com/stoatchat/livekit-server/pkg/service" ) type FakeSIPStore struct { diff --git a/pkg/telemetry/events.go b/pkg/telemetry/events.go index c3cb9108..0fd8160c 100644 --- a/pkg/telemetry/events.go +++ b/pkg/telemetry/events.go @@ -87,6 +87,7 @@ func (t *telemetryService) ParticipantJoined( ctx, livekit.RoomID(room.Sid), livekit.RoomName(room.Name), + room.Metadata, livekit.ParticipantID(participant.Sid), livekit.ParticipantIdentity(participant.Identity), guard, @@ -127,6 +128,7 @@ func (t *telemetryService) ParticipantActive( ctx, livekit.RoomID(room.Sid), livekit.RoomName(room.Name), + room.Metadata, livekit.ParticipantID(participant.Sid), livekit.ParticipantIdentity(participant.Identity), guard, @@ -164,6 +166,7 @@ func (t *telemetryService) ParticipantResumed( ctx, livekit.RoomID(room.Sid), livekit.RoomName(room.Name), + room.Metadata, livekit.ParticipantID(participant.Sid), livekit.ParticipantIdentity(participant.Identity), nil, @@ -572,13 +575,14 @@ func (t *telemetryService) Webhook(ctx context.Context, webhookInfo *livekit.Web }) } -// returns a livekit.Room with only name and sid filled out +// returns a livekit.Room with only name, sid and metadata filled out // returns nil if room is not found func (t *telemetryService) getRoomDetails(participantID livekit.ParticipantID) *livekit.Room { if worker, ok := t.getWorker(participantID); ok { return &livekit.Room{ Sid: string(worker.roomID), Name: string(worker.roomName), + Metadata: worker.roomMetadata, } } diff --git a/pkg/telemetry/statsworker.go b/pkg/telemetry/statsworker.go index caf0d675..30124081 100644 --- a/pkg/telemetry/statsworker.go +++ b/pkg/telemetry/statsworker.go @@ -59,6 +59,7 @@ type StatsWorker struct { t TelemetryService roomID livekit.RoomID roomName livekit.RoomName + roomMetadata string participantID livekit.ParticipantID participantIdentity livekit.ParticipantIdentity isConnected bool @@ -75,6 +76,7 @@ func newStatsWorker( t TelemetryService, roomID livekit.RoomID, roomName livekit.RoomName, + roomMetadata string, participantID livekit.ParticipantID, identity livekit.ParticipantIdentity, guard *ReferenceGuard, @@ -84,6 +86,7 @@ func newStatsWorker( t: t, roomID: roomID, roomName: roomName, + roomMetadata: roomMetadata, participantID: participantID, participantIdentity: identity, outgoingPerTrack: make(map[livekit.TrackID][]*livekit.AnalyticsStat), diff --git a/pkg/telemetry/statsworker_test.go b/pkg/telemetry/statsworker_test.go index f7ae4881..8c0f2956 100644 --- a/pkg/telemetry/statsworker_test.go +++ b/pkg/telemetry/statsworker_test.go @@ -9,7 +9,7 @@ import ( func TestStatsWorker(t *testing.T) { t.Run("reference counted close works", func(t *testing.T) { var g0, g1 ReferenceGuard - w := newStatsWorker(t.Context(), nil, "", "", "", "", &g0) + w := newStatsWorker(t.Context(), nil, "", "", "", "", "", &g0) require.False(t, w.Closed(&g1)) require.False(t, w.Close(&g0)) require.False(t, w.Closed(&g1)) diff --git a/pkg/telemetry/telemetryfakes/fake_analytics_service.go b/pkg/telemetry/telemetryfakes/fake_analytics_service.go index 87b89dc9..ee432d76 100644 --- a/pkg/telemetry/telemetryfakes/fake_analytics_service.go +++ b/pkg/telemetry/telemetryfakes/fake_analytics_service.go @@ -5,9 +5,9 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/telemetry" "github.com/livekit/protocol/livekit" "github.com/livekit/protocol/observability/roomobs" + "github.com/stoatchat/livekit-server/pkg/telemetry" ) type FakeAnalyticsService struct { diff --git a/pkg/telemetry/telemetryfakes/fake_telemetry_service.go b/pkg/telemetry/telemetryfakes/fake_telemetry_service.go index b636616b..13900b3d 100644 --- a/pkg/telemetry/telemetryfakes/fake_telemetry_service.go +++ b/pkg/telemetry/telemetryfakes/fake_telemetry_service.go @@ -5,10 +5,10 @@ import ( "context" "sync" - "github.com/stoatchat/livekit-server/pkg/sfu/mime" - "github.com/stoatchat/livekit-server/pkg/telemetry" "github.com/livekit/protocol/livekit" "github.com/livekit/protocol/observability/roomobs" + "github.com/stoatchat/livekit-server/pkg/sfu/mime" + "github.com/stoatchat/livekit-server/pkg/telemetry" ) type FakeTelemetryService struct { @@ -178,12 +178,13 @@ type FakeTelemetryService struct { arg4 mime.MimeType arg5 livekit.VideoQuality } - TrackMutedStub func(context.Context, livekit.ParticipantID, *livekit.TrackInfo) + TrackMutedStub func(context.Context, livekit.ParticipantID, livekit.ParticipantIdentity, *livekit.TrackInfo) trackMutedMutex sync.RWMutex trackMutedArgsForCall []struct { arg1 context.Context arg2 livekit.ParticipantID - arg3 *livekit.TrackInfo + arg3 livekit.ParticipantIdentity + arg4 *livekit.TrackInfo } TrackPublishRTPStatsStub func(context.Context, livekit.ParticipantID, livekit.TrackID, mime.MimeType, int, *livekit.RTPStats) trackPublishRTPStatsMutex sync.RWMutex @@ -258,12 +259,13 @@ type FakeTelemetryService struct { arg4 *livekit.ParticipantInfo arg5 bool } - TrackUnmutedStub func(context.Context, livekit.ParticipantID, *livekit.TrackInfo) + TrackUnmutedStub func(context.Context, livekit.ParticipantID, livekit.ParticipantIdentity, *livekit.TrackInfo) trackUnmutedMutex sync.RWMutex trackUnmutedArgsForCall []struct { arg1 context.Context arg2 livekit.ParticipantID - arg3 *livekit.TrackInfo + arg3 livekit.ParticipantIdentity + arg4 *livekit.TrackInfo } TrackUnpublishedStub func(context.Context, livekit.ParticipantID, livekit.ParticipantIdentity, *livekit.TrackInfo, bool) trackUnpublishedMutex sync.RWMutex @@ -1127,18 +1129,19 @@ func (fake *FakeTelemetryService) TrackMaxSubscribedVideoQualityArgsForCall(i in return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5 } -func (fake *FakeTelemetryService) TrackMuted(arg1 context.Context, arg2 livekit.ParticipantID, arg3 *livekit.TrackInfo) { +func (fake *FakeTelemetryService) TrackMuted(arg1 context.Context, arg2 livekit.ParticipantID, arg3 livekit.ParticipantIdentity, arg4 *livekit.TrackInfo) { fake.trackMutedMutex.Lock() fake.trackMutedArgsForCall = append(fake.trackMutedArgsForCall, struct { arg1 context.Context arg2 livekit.ParticipantID - arg3 *livekit.TrackInfo - }{arg1, arg2, arg3}) + arg3 livekit.ParticipantIdentity + arg4 *livekit.TrackInfo + }{arg1, arg2, arg3, arg4}) stub := fake.TrackMutedStub - fake.recordInvocation("TrackMuted", []interface{}{arg1, arg2, arg3}) + fake.recordInvocation("TrackMuted", []interface{}{arg1, arg2, arg3, arg4}) fake.trackMutedMutex.Unlock() if stub != nil { - fake.TrackMutedStub(arg1, arg2, arg3) + fake.TrackMutedStub(arg1, arg2, arg3, arg4) } } @@ -1148,17 +1151,17 @@ func (fake *FakeTelemetryService) TrackMutedCallCount() int { return len(fake.trackMutedArgsForCall) } -func (fake *FakeTelemetryService) TrackMutedCalls(stub func(context.Context, livekit.ParticipantID, *livekit.TrackInfo)) { +func (fake *FakeTelemetryService) TrackMutedCalls(stub func(context.Context, livekit.ParticipantID, livekit.ParticipantIdentity, *livekit.TrackInfo)) { fake.trackMutedMutex.Lock() defer fake.trackMutedMutex.Unlock() fake.TrackMutedStub = stub } -func (fake *FakeTelemetryService) TrackMutedArgsForCall(i int) (context.Context, livekit.ParticipantID, *livekit.TrackInfo) { +func (fake *FakeTelemetryService) TrackMutedArgsForCall(i int) (context.Context, livekit.ParticipantID, livekit.ParticipantIdentity, *livekit.TrackInfo) { fake.trackMutedMutex.RLock() defer fake.trackMutedMutex.RUnlock() argsForCall := fake.trackMutedArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 + return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 } func (fake *FakeTelemetryService) TrackPublishRTPStats(arg1 context.Context, arg2 livekit.ParticipantID, arg3 livekit.TrackID, arg4 mime.MimeType, arg5 int, arg6 *livekit.RTPStats) { @@ -1477,18 +1480,19 @@ func (fake *FakeTelemetryService) TrackSubscribedArgsForCall(i int) (context.Con return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5 } -func (fake *FakeTelemetryService) TrackUnmuted(arg1 context.Context, arg2 livekit.ParticipantID, arg3 *livekit.TrackInfo) { +func (fake *FakeTelemetryService) TrackUnmuted(arg1 context.Context, arg2 livekit.ParticipantID, arg3 livekit.ParticipantIdentity, arg4 *livekit.TrackInfo) { fake.trackUnmutedMutex.Lock() fake.trackUnmutedArgsForCall = append(fake.trackUnmutedArgsForCall, struct { arg1 context.Context arg2 livekit.ParticipantID - arg3 *livekit.TrackInfo - }{arg1, arg2, arg3}) + arg3 livekit.ParticipantIdentity + arg4 *livekit.TrackInfo + }{arg1, arg2, arg3, arg4}) stub := fake.TrackUnmutedStub - fake.recordInvocation("TrackUnmuted", []interface{}{arg1, arg2, arg3}) + fake.recordInvocation("TrackUnmuted", []interface{}{arg1, arg2, arg3, arg4}) fake.trackUnmutedMutex.Unlock() if stub != nil { - fake.TrackUnmutedStub(arg1, arg2, arg3) + fake.TrackUnmutedStub(arg1, arg2, arg3, arg4) } } @@ -1498,17 +1502,17 @@ func (fake *FakeTelemetryService) TrackUnmutedCallCount() int { return len(fake.trackUnmutedArgsForCall) } -func (fake *FakeTelemetryService) TrackUnmutedCalls(stub func(context.Context, livekit.ParticipantID, *livekit.TrackInfo)) { +func (fake *FakeTelemetryService) TrackUnmutedCalls(stub func(context.Context, livekit.ParticipantID, livekit.ParticipantIdentity, *livekit.TrackInfo)) { fake.trackUnmutedMutex.Lock() defer fake.trackUnmutedMutex.Unlock() fake.TrackUnmutedStub = stub } -func (fake *FakeTelemetryService) TrackUnmutedArgsForCall(i int) (context.Context, livekit.ParticipantID, *livekit.TrackInfo) { +func (fake *FakeTelemetryService) TrackUnmutedArgsForCall(i int) (context.Context, livekit.ParticipantID, livekit.ParticipantIdentity, *livekit.TrackInfo) { fake.trackUnmutedMutex.RLock() defer fake.trackUnmutedMutex.RUnlock() argsForCall := fake.trackUnmutedArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 + return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 } func (fake *FakeTelemetryService) TrackUnpublished(arg1 context.Context, arg2 livekit.ParticipantID, arg3 livekit.ParticipantIdentity, arg4 *livekit.TrackInfo, arg5 bool) { diff --git a/pkg/telemetry/telemetryservice.go b/pkg/telemetry/telemetryservice.go index 089162d5..1e30ad8f 100644 --- a/pkg/telemetry/telemetryservice.go +++ b/pkg/telemetry/telemetryservice.go @@ -202,6 +202,7 @@ func (t *telemetryService) getOrCreateWorker( ctx context.Context, roomID livekit.RoomID, roomName livekit.RoomName, + roomMetadata string, participantID livekit.ParticipantID, participantIdentity livekit.ParticipantIdentity, guard *ReferenceGuard, @@ -224,6 +225,7 @@ func (t *telemetryService) getOrCreateWorker( t, roomID, roomName, + roomMetadata, participantID, participantIdentity, guard,