-
Notifications
You must be signed in to change notification settings - Fork 4k
metric: add labels for sql.*.started.count
#151946
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
base: master
Are you sure you want to change the base?
Conversation
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
StaticLabels: metric.MakeLabelPairs(metric.LabelQueryType, "started-select"), | ||
Essential: true, | ||
Category: metric.Metadata_SQL, | ||
HowToUse: "This high-level metric reflects workload volume. Monitor this metric to identify abnormal application behavior or patterns over time. If abnormal patterns emerge, apply the metric's time range to the SQL Activity pages to investigate interesting outliers or patterns. For example, on the Transactions page and the Statements page, sort on the Execution Count column. To find problematic sessions, on the Sessions page, sort on the Transaction Count column. Find the sessions with high transaction counts and trace back to a user or application.", |
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.
Can you say anything more specific about started
vs other metrics that would be helpful here?
I'm also not sure this metric is "essential". Most customers use the executed metrics to count QPS so we should justify why they should also pay attention to these.
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.
Good point. I searched Slack and found only 2 threads that explicitly mentioned using the started
metrics for troubleshooting:
- https://cockroachlabs.slack.com/archives/C02119Q1G05/p1623169882143700?thread_ts=1623161302.135100&cid=C02119Q1G05
- https://cockroachlabs.slack.com/archives/C0713QV7XHP/p1714432731834549
Additionally, the started
metrics was introduced in #37264, which also introduced the executed
metrics as a claimed more useful one.
So maybe we should close it for now until receiving explicit ask for this feature?
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.
Removed the "Essential:true" field per offline discussion.
68713da
to
7b76724
Compare
Previously, only metrics for *executed* `SELECT|UPDATE|DELETE|INSERT` statements are labeled, while their *started* equivalent are not labeled. This commit is to label these metrics. Ref cockroachdb#143536 Release note (ops change): TBD <what was there before: Previously, ...> <why it needed to change: This was inadequate because ...> <what you did about it: To address this, this patch ...>
7b76724
to
fc51076
Compare
Previously, only metrics for executed
SELECT|UPDATE|DELETE|INSERT
statements are labeled, while their started equivalent are not labeled. This commit is to label these metrics. Since they are not frequently used metrics, they are not marked as Essential.Fixes: #152074
Release note (ops change):
sql.select.started.count
,sql.insert.started.count
,sql.update.started.count
,sql.delete.started.count
are now labeled withsql.count
.