Skip to content

Commit 5e395ad

Browse files
authored
fix: missing keydb client stats (#6360)
# Description Adding keydb client stats. ## Linear Ticket Fixes [PIPE-2404](https://linear.app/rudderstack/issue/PIPE-2404/add-keydb-client-stats) ## Security - [x] The code changed/added as part of this pull request won't create any security issues with how the software is being used.
1 parent 1bc6695 commit 5e395ad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

services/dedup/keydb/keydb.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ func NewKeyDB(conf *config.Config, stat stats.Stats, log logger.Logger) (types.D
3030
if len(nodeAddresses) == 0 {
3131
return nil, fmt.Errorf("keydb dedup: no node addresses provided")
3232
}
33-
c, err := client.NewClient(client.Config{
33+
34+
clientConfig := client.Config{
3435
Addresses: strings.Split(nodeAddresses, ","),
3536
TotalHashRanges: uint32(conf.GetInt("KeyDB.Dedup.TotalHashRanges", 128)),
3637
RetryPolicy: client.RetryPolicy{
@@ -42,7 +43,9 @@ func NewKeyDB(conf *config.Config, stat stats.Stats, log logger.Logger) (types.D
4243
// To detect issues monitor the client metrics:
4344
// https://github.com/rudderlabs/keydb/blob/v0.4.2-alpha/client/client.go#L160
4445
},
45-
}, log.Child("keydb"))
46+
}
47+
48+
c, err := client.NewClient(clientConfig, log.Child("keydb"), client.WithStats(stat))
4649
if err != nil {
4750
return nil, err
4851
}

0 commit comments

Comments
 (0)