( ctx context.Context, roomID livekit.RoomID, roomName livekit.RoomName, participantID livekit.ParticipantID, track *livekit.TrackInfo, publisher *livekit.ParticipantInfo, shouldSendEvent bool, )
| 324 | } |
| 325 | |
| 326 | func (t *telemetryService) TrackSubscribed( |
| 327 | ctx context.Context, |
| 328 | roomID livekit.RoomID, |
| 329 | roomName livekit.RoomName, |
| 330 | participantID livekit.ParticipantID, |
| 331 | track *livekit.TrackInfo, |
| 332 | publisher *livekit.ParticipantInfo, |
| 333 | shouldSendEvent bool, |
| 334 | ) { |
| 335 | t.enqueue(func() { |
| 336 | prometheus.RecordTrackSubscribeSuccess(track.Type.String()) |
| 337 | |
| 338 | if !shouldSendEvent { |
| 339 | return |
| 340 | } |
| 341 | |
| 342 | room := toMinimalRoomProto(roomID, roomName) |
| 343 | ev := newTrackEvent(livekit.AnalyticsEventType_TRACK_SUBSCRIBED, room, participantID, track) |
| 344 | ev.Publisher = publisher |
| 345 | t.SendEvent(ctx, ev) |
| 346 | }) |
| 347 | } |
| 348 | |
| 349 | func (t *telemetryService) TrackSubscribeFailed( |
| 350 | ctx context.Context, |
nothing calls this directly
no test coverage detected