exclude sip client from track publish metric (#3007)
This commit is contained in:
@@ -2133,7 +2133,13 @@ func (p *ParticipantImpl) mediaTrackReceived(track *webrtc.TrackRemote, rtpRecei
|
|||||||
"track", logger.Proto(mt.ToProto()),
|
"track", logger.Proto(mt.ToProto()),
|
||||||
"cost", pubTime.Milliseconds(),
|
"cost", pubTime.Milliseconds(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// SIP client relies on the remote peer's media packet to publish the track and
|
||||||
|
// sometimes it costs 10s to arrive after handshake.
|
||||||
|
// So we ignore the publish time for SIP client to avoid the high value in the metrics.
|
||||||
|
if p.Kind() != livekit.ParticipantInfo_SIP {
|
||||||
prometheus.RecordPublishTime(mt.Source(), mt.Kind(), pubTime)
|
prometheus.RecordPublishTime(mt.Source(), mt.Kind(), pubTime)
|
||||||
|
}
|
||||||
p.handleTrackPublished(mt)
|
p.handleTrackPublished(mt)
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user