Skip to content

Commit 321213f

Browse files
craig[bot]yuzefovich
andcommitted
Merge #155203
155203: ui: ensure all essential SQL metrics are shown on dashboards r=yuzefovich a=yuzefovich This commit audits all essential metrics owned by SQL Queries to ensure that all of them show up on one of the dashboards on SQL page. The following changes are made: - `txn.restarts.txnpush` and `txn.restarts.unknown` are added to existing "Transaction Restarts" dashboard - `sql.conn.failures` is added on a new dashboard, right before "Connection Latency" - SELECTs, UPDATEs, INSERTS, and DELETEs executed within routines are now shown on new dashboard "SQL Queries Within Routines Per Second", right after "SQL Queries Per Second" - new dashboard "Table Statistics Collections" shows details about Auto and Auto Partial as well as manual stats collections, right after "Schema Changes". Fixes: #154554. Release note (ui change): SQL dashboard has been extended to include more details (mostly about stmts executed within routines and table statistics collections). Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
2 parents a56c46b + 0bcd10f commit 321213f

File tree

1 file changed

+107
-0
lines changed
  • pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards

1 file changed

+107
-0
lines changed

pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/sql.tsx

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,39 @@ export default function (props: GraphDashboardProps) {
174174
</Axis>
175175
</LineGraph>,
176176

177+
<LineGraph
178+
title="SQL Queries Within Routines Per Second"
179+
isKvGraph={false}
180+
sources={nodeSources}
181+
tenantSource={tenantSource}
182+
tooltip={`A ten-second moving average of the # of SELECT, INSERT, UPDATE, and DELETE statements
183+
executed within routines (user-defined functions and stored procedures) ${tooltipSelection}.`}
184+
showMetricsInTooltip={true}
185+
>
186+
<Axis label="queries within routines">
187+
<Metric
188+
name="cr.node.sql.routine.select.count"
189+
title="Selects"
190+
nonNegativeRate
191+
/>
192+
<Metric
193+
name="cr.node.sql.routine.update.count"
194+
title="Updates"
195+
nonNegativeRate
196+
/>
197+
<Metric
198+
name="cr.node.sql.routine.insert.count"
199+
title="Inserts"
200+
nonNegativeRate
201+
/>
202+
<Metric
203+
name="cr.node.sql.routine.delete.count"
204+
title="Deletes"
205+
nonNegativeRate
206+
/>
207+
</Axis>
208+
</LineGraph>,
209+
177210
<LineGraph
178211
title="SQL Statement Errors"
179212
isKvGraph={false}
@@ -271,6 +304,23 @@ export default function (props: GraphDashboardProps) {
271304
</Axis>
272305
</LineGraph>,
273306

307+
<LineGraph
308+
title="Failed SQL Connections"
309+
isKvGraph={false}
310+
sources={nodeSources}
311+
tenantSource={tenantSource}
312+
tooltip={`The total number of failed SQL connection attempts ${tooltipSelection}.`}
313+
showMetricsInTooltip={true}
314+
>
315+
<Axis label="failed connections">
316+
<Metric
317+
name="cr.node.sql.conn.failures"
318+
title="Number of Failed SQL Connections"
319+
downsampleMax
320+
/>
321+
</Axis>
322+
</LineGraph>,
323+
274324
<LineGraph
275325
title="Connection Latency: 99th percentile"
276326
isKvGraph={false}
@@ -542,6 +592,16 @@ export default function (props: GraphDashboardProps) {
542592
title="Aborted"
543593
nonNegativeRate
544594
/>
595+
<Metric
596+
name="cr.node.txn.restarts.txnpush"
597+
title="Pushed"
598+
nonNegativeRate
599+
/>
600+
<Metric
601+
name="cr.node.txn.restarts.unknown"
602+
title="Unknown"
603+
nonNegativeRate
604+
/>
545605
</Axis>
546606
</LineGraph>,
547607

@@ -641,6 +701,53 @@ export default function (props: GraphDashboardProps) {
641701
</Axis>
642702
</LineGraph>,
643703

704+
<LineGraph
705+
title="Table Statistics Collections"
706+
isKvGraph={false}
707+
sources={nodeSources}
708+
tenantSource={tenantSource}
709+
tooltip={`Details about table statistics collections ${tooltipSelection}.`}
710+
showMetricsInTooltip={true}
711+
>
712+
<Axis label="jobs">
713+
<Metric
714+
name="cr.node.jobs.auto_create_stats.currently_running"
715+
title="Auto Running"
716+
downsampleMax
717+
/>
718+
<Metric
719+
name="cr.node.jobs.auto_create_partial_stats.currently_running"
720+
title="Auto Partial Running"
721+
downsampleMax
722+
/>
723+
<Metric
724+
name="cr.node.jobs.create_stats.currently_running"
725+
title="Manual Running"
726+
downsampleMax
727+
/>
728+
<Metric
729+
name="cr.node.jobs.auto_create_stats.currently_paused"
730+
title="Auto Paused"
731+
downsampleMax
732+
/>
733+
<Metric
734+
name="cr.node.jobs.auto_create_partial_stats.currently_paused"
735+
title="Auto Partial Paused"
736+
downsampleMax
737+
/>
738+
<Metric
739+
name="cr.node.jobs.auto_create_stats.resume_failed"
740+
title="Auto Failed"
741+
downsampleMax
742+
/>
743+
<Metric
744+
name="cr.node.jobs.auto_create_partial_stats.resume_failed"
745+
title="Auto Partial Failed"
746+
downsampleMax
747+
/>
748+
</Axis>
749+
</LineGraph>,
750+
644751
<LineGraph
645752
title="Statement Denials: Cluster Settings"
646753
isKvGraph={false}

0 commit comments

Comments
 (0)