-
Notifications
You must be signed in to change notification settings - Fork 512
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
Add additional querier metrics #7099
Conversation
Adds metrics to: - count how many queries are executed in total for a particular source: ingesters vs store gateways - count the total chunks read from a store gateway
@@ -135,6 +137,11 @@ func newBlocksStoreQueryableMetrics(reg prometheus.Registerer) *blocksStoreQuery | |||
Name: "cortex_querier_blocks_with_compactor_shard_but_incompatible_query_shard_total", | |||
Help: "Blocks that couldn't be checked for query and compactor sharding optimization due to incompatible shard counts.", | |||
}), | |||
// Named to be consistent with distributor_query_ingester_chunks_total |
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.
This metric is very similar to the metrics in query_metrics.go, but those are mostly specific to ingesters/distributors and not as easy to share with a block store queryable, so I followed the precedent of keeping the ingester and store gateway metrics in queriers separate.
Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@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. Only a nitpick on the changelog
Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
@@ -135,6 +137,11 @@ func newBlocksStoreQueryableMetrics(reg prometheus.Registerer) *blocksStoreQuery | |||
Name: "cortex_querier_blocks_with_compactor_shard_but_incompatible_query_shard_total", | |||
Help: "Blocks that couldn't be checked for query and compactor sharding optimization due to incompatible shard counts.", | |||
}), | |||
// Named to be consistent with distributor_query_ingester_chunks_total | |||
chunksTotal: promauto.With(reg).NewCounter(prometheus.CounterOpts{ | |||
Name: "cortex_query_storegateway_chunks_total", |
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.
The querier metrics are prefixed by cortex_querier_
. WDYT if we change the metric name to cortex_querier_query_storegateway_chunks_total
?
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.
That name sounds good. Pushed PR #7145
@@ -135,6 +137,11 @@ func newBlocksStoreQueryableMetrics(reg prometheus.Registerer) *blocksStoreQuery | |||
Name: "cortex_querier_blocks_with_compactor_shard_but_incompatible_query_shard_total", | |||
Help: "Blocks that couldn't be checked for query and compactor sharding optimization due to incompatible shard counts.", | |||
}), | |||
// Named to be consistent with distributor_query_ingester_chunks_total |
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.
Nit: the metric is named cortex_distributor_query_ingester_chunks_total
(with cortex_
prefix).
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.
This is really a nit, not worth a PR, but if you address the other comment then you could fix this too.
What this PR does
Adds metrics to:
Which issue(s) this PR fixes or relates to
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.