Skip to content

monitoring: fix transaction duration graph

Warren Gifford requested to merge monitoring_fix_transaction_duration_grap into main

Created by: michaellzc

close https://github.com/sourcegraph/sourcegraph/issues/34317

Test plan

Local

actually doesn't really make sense to test locally because there's only one db

sg run redis-postgres

open a new tab

sg start monitoring

the graph should still show something

Live

Go to dogfood, https://k8s.sgdev.org/-/debug/grafana/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Prometheus%22,%7B%22exemplar%22:true,%22expr%22:%22sum%20by%20(job)%20(pg_stat_activity_max_tx_duration%7Bdatname!~%5C%22template.*%7Cpostgres%7Ccloudsqladmin%5C%22%7D)%22,%22requestId%22:%22Q-a3c70dc0-1a9c-4b54-b2c4-f1f2c14ecad0-0A%22%7D%5D

the graph should show two (or more) lines instead of just one

CleanShot 2022-04-25 at 21 09 59

Merge request reports

Loading