Skip to content

Conversation

harry671003
Copy link
Contributor

@harry671003 harry671003 commented Nov 4, 2024

What this PR does:

  • Adding a new metric for tracking in-use bytes in store-gateway.
  • This should help us catch leaks in the pool more easily

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@dosubot dosubot bot added component/store-gateway type/observability To help know what is going on inside Cortex labels Nov 4, 2024
pool: upstream,
poolByteStats: promauto.With(reg).NewCounterVec(prometheus.CounterOpts{
Name: "cortex_bucket_store_chunk_pool_operation_bytes_total",
Help: "Total bytes number of bytes pooled by operation.",
}, []string{"operation", "stats"}),
}, nil
poolInUseBytes: promauto.With(reg).NewGauge(prometheus.GaugeOpts{
Name: "cortex_bucket_store_chunk_pool_inuse_bytes",
Copy link
Contributor

@yeya24 yeya24 Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just use NewGaugeFunc? This way we don't need the goroutine

@harry671003 harry671003 force-pushed the chunk_pool_inuse_metric branch 2 times, most recently from ef018b2 to dbf6bc3 Compare November 4, 2024 20:02
@harry671003 harry671003 changed the title storegateway: Add a metric for inuse bytes storegateway: Add a metric for chunk pool inuse bytes Nov 4, 2024
Signed-off-by: 🌲 Harry 🌊 John 🏔 <[email protected]>
@harry671003 harry671003 force-pushed the chunk_pool_inuse_metric branch from dbf6bc3 to a5c6eb7 Compare November 4, 2024 20:10
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 4, 2024
@yeya24 yeya24 merged commit c25b18d into cortexproject:master Nov 4, 2024
16 checks passed
@harry671003 harry671003 deleted the chunk_pool_inuse_metric branch November 4, 2024 20:56
CharlieTLe pushed a commit to CharlieTLe/cortex that referenced this pull request Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/store-gateway lgtm This PR has been approved by a maintainer size/M type/observability To help know what is going on inside Cortex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants