Ensure subscription logging is clear & without sampling (#1440)

This commit is contained in:
David Zhao
2023-02-17 22:15:19 -08:00
committed by GitHub
parent 57f6790b28
commit 7a2d9b3d61
2 changed files with 4 additions and 4 deletions

View File

@@ -1053,7 +1053,7 @@ func (p *ParticipantImpl) setupUpTrackManager() {
func (p *ParticipantImpl) setupSubscriptionManager() {
p.SubscriptionManager = NewSubscriptionManager(SubscriptionManagerParams{
Participant: p,
Logger: p.params.Logger,
Logger: p.params.Logger.WithoutSampler(),
TrackResolver: p.params.TrackResolver,
Telemetry: p.params.Telemetry,
OnTrackSubscribed: p.onTrackSubscribed,
@@ -1677,7 +1677,7 @@ func (p *ParticipantImpl) addMediaTrack(signalCid string, sdpCid string, ti *liv
if !p.IsClosed() {
// unpublished events aren't necessary when participant is closed
p.params.Logger.Debugw("unpublished track", "trackID", ti.Sid, "trackInfo", ti)
p.params.Logger.Infow("unpublished track", "trackID", ti.Sid, "trackInfo", ti)
p.lock.RLock()
onTrackUnpublished := p.onTrackUnpublished
p.lock.RUnlock()

View File

@@ -295,7 +295,7 @@ func (m *SubscriptionManager) reconcileSubscription(s *trackSubscription) {
// this is the *only* case we'd change desired state
if s.durationSinceStart() > notFoundTimeout {
s.maybeRecordError(m.params.Telemetry, m.params.Participant.ID(), err, true)
s.logger.Infow("unsubscribing track since track isn't available", "error", err)
s.logger.Infow("unsubscribing from track after notFoundTimeout", "error", err)
s.setDesired(false)
m.queueReconcile(s.trackID)
}
@@ -771,7 +771,7 @@ func (s *trackSubscription) handleSourceTrackRemoved() {
}
// source track removed, we would unsubscribe
s.logger.Debugw("unsubscribing track since source track was removed")
s.logger.Infow("unsubscribing from track since source track was removed")
s.desired = false
s.setChangedNotifierLocked(nil)