Skip to content

Commit

Permalink
add component label to caching bucket metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxu1024 committed Nov 13, 2023
1 parent 0f0119b commit 26e48a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/compactor/compactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"flag"
"fmt"
"github.com/cortexproject/cortex/pkg/storegateway"
"github.com/thanos-io/thanos/pkg/extprom"
"hash/fnv"
"math/rand"
"os"
Expand Down Expand Up @@ -537,7 +538,7 @@ func (c *Compactor) starting(ctx context.Context) error {

// Wrap the bucket client with caching layer if caching bucket is enabled.
if c.compactorCfg.CachingBucketEnabled {
c.bucketClient, err = cortex_tsdb.CreateCachingBucket(c.storageCfg.BucketStore.ChunksCache, c.storageCfg.BucketStore.MetadataCache, c.bucketClient, c.logger, c.registerer)
c.bucketClient, err = cortex_tsdb.CreateCachingBucket(c.storageCfg.BucketStore.ChunksCache, c.storageCfg.BucketStore.MetadataCache, c.bucketClient, c.logger, extprom.WrapRegistererWith(prometheus.Labels{"component": "compactor"}, c.registerer))
if err != nil {
return errors.Wrapf(err, "create caching bucket")
}
Expand Down

0 comments on commit 26e48a9

Please sign in to comment.