mirror of
https://github.com/livekit/livekit.git
synced 2026-10-15 06:50:08 +00:00
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()),
|
||||
"cost", pubTime.Milliseconds(),
|
||||
)
|
||||
prometheus.RecordPublishTime(mt.Source(), mt.Kind(), pubTime)
|
||||
|
||||
// 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)
|
||||
}
|
||||
p.handleTrackPublished(mt)
|
||||
}()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user