adding rtc_init stat (#1316)

* adding rtc_initiated stat

* clean up signal and rtc init/connected

* update naming and break out stats update funcs

* update protocol dependency
This commit is contained in:
Dan McFaul
2023-01-23 12:49:15 -07:00
committed by GitHub
parent 56803a6b29
commit 9e3ca1e989
7 changed files with 83 additions and 64 deletions
+2
View File
@@ -8,6 +8,7 @@ import (
"go.uber.org/atomic"
"google.golang.org/protobuf/proto"
"github.com/livekit/livekit-server/pkg/telemetry/prometheus"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
"github.com/livekit/protocol/utils"
@@ -82,6 +83,7 @@ func (r *LocalRouter) ListNodes() ([]*livekit.Node, error) {
}
func (r *LocalRouter) StartParticipantSignal(ctx context.Context, roomName livekit.RoomName, pi ParticipantInit) (connectionID livekit.ConnectionID, reqSink MessageSink, resSource MessageSource, err error) {
prometheus.IncrementParticipantRtcInit(1)
// treat it as a new participant connecting
if r.onNewParticipant == nil {
err = ErrHandlerNotDefined
+1
View File
@@ -207,6 +207,7 @@ func (r *RedisRouter) WriteNodeRTC(_ context.Context, rtcNodeID string, msg *liv
}
func (r *RedisRouter) startParticipantRTC(ss *livekit.StartSession, participantKey livekit.ParticipantKey, participantKeyB62 livekit.ParticipantKey) error {
prometheus.IncrementParticipantRtcInit(1)
// find the node where the room is hosted at
rtcNode, err := r.GetNodeForRoom(r.ctx, livekit.RoomName(ss.RoomName))
if err != nil {