Skip to content

Commit 80dbc9b

Browse files
Add PSRPC observability to IOInfoClient (#1056)
1 parent 71444a1 commit 80dbc9b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

pkg/config/service.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ import (
1919
"os"
2020
"time"
2121

22+
"github.com/prometheus/client_golang/prometheus"
2223
"gopkg.in/yaml.v3"
2324

2425
"github.com/livekit/egress/pkg/errors"
2526
"github.com/livekit/protocol/logger"
27+
"github.com/livekit/protocol/rpc"
2628
"github.com/livekit/protocol/utils"
2729
)
2830

@@ -102,6 +104,8 @@ func NewServiceConfig(confString string) (*ServiceConfig, error) {
102104
conf.NodeID = utils.NewGuid("NE_")
103105
conf.InitDefaults()
104106

107+
rpc.InitPSRPCStats(prometheus.Labels{"node_id": conf.NodeID, "node_type": "EGRESS"})
108+
105109
if err := conf.initLogger("nodeID", conf.NodeID, "clusterID", conf.ClusterID); err != nil {
106110
return nil, err
107111
}

pkg/info/io.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ type update struct {
7272
}
7373

7474
func NewIOClient(conf *config.BaseConfig, bus psrpc.MessageBus) (IOClient, error) {
75-
client, err := rpc.NewIOInfoClient(bus)
75+
client, err := rpc.NewIOInfoClient(bus, rpc.WithClientObservability(logger.GetLogger()))
7676
if err != nil {
7777
return nil, err
7878
}

0 commit comments

Comments
 (0)