cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.22k stars 3.82k forks source link

Add metrics for sql service latency broken down by statement type #118534

Open dikshant opened 10 months ago

dikshant commented 10 months ago

Today we have SQL service latency metric (called sql_service_latency_bucket in prometheus) for overall SQL traffic. Some customers find it valuable to break this down by SELECT, INSERT, DELETE, UPDATE etc so they can understand performance characteristics better. To quote a customer:

The idea is that update, insert, select, and to some extent delete have different > performance characteristics and resource needs, so it might be useful to have e.g. >cr.node.sql.insert_service.latency-p50, cr.node.sql.update_service.latency-p50, >cr.node.sql.select_service.latency-p50 instead of just cr.node.sql.service.latency-p50

Jira issue: CRDB-35777

kevin-v-ngo commented 10 months ago

Adding the SQL Queries team as they own this metric