Use LocalNode ID in Prometheus metrics (#959)

This commit is contained in:
Mathew Kamkar
2022-08-25 22:16:20 -07:00
committed by GitHub
parent c64e0b2271
commit 767d660809
5 changed files with 26 additions and 6 deletions
+5 -3
View File
@@ -20,6 +20,7 @@ import (
serverlogger "github.com/livekit/livekit-server/pkg/logger"
"github.com/livekit/livekit-server/pkg/routing"
"github.com/livekit/livekit-server/pkg/service"
"github.com/livekit/livekit-server/pkg/telemetry/prometheus"
"github.com/livekit/livekit-server/pkg/testutils"
testclient "github.com/livekit/livekit-server/test/client"
)
@@ -39,14 +40,14 @@ const (
// connectTimeout = 5000 * time.Second
)
var (
roomClient livekit.RoomService
)
var roomClient livekit.RoomService
func init() {
serverlogger.InitFromConfig(config.LoggingConfig{
Config: logger.Config{Level: "debug"},
})
prometheus.Init("test")
}
func setupSingleNodeTest(name string) (*service.LivekitServer, func()) {
@@ -222,6 +223,7 @@ func createRTCClientWithToken(token string, port int, opts *testclient.Options)
return c
}
func redisClient() *redis.Client {
return redis.NewClient(&redis.Options{
Addr: "localhost:6379",