-
Notifications
You must be signed in to change notification settings - Fork 831
TSDB: compactor's syncer metrics #2023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TSDB: compactor's syncer metrics #2023
Conversation
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing job! ❤️ The new metrics helper design is way better and more flexible. It takes a bit of time to get into, but looks worth the effort to me.
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-Authored-By: Jacob Lisi <jacob.t.lisi@gmail.com> Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
This PR exposes metrics from TSDB's compactor "syncer" component. In Cortex, we instantiate multiple syncers, new one for each sync operation. Because of this, approach used to gather metrics is different from previous TSDB metrics work.
Here we register fixed set of metrics that are exported, and we update them when syncer has done its job, via
defer c.syncerMetrics.gatherThanosSyncerMetrics(reg)
incompactUser
method.Since tsdb.Compactor is reused between
compactUser
calls, we don't need to handle those metrics (they are expored with their originalprometheus_tsdb_compactions
prefix)Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]