-
Notifications
You must be signed in to change notification settings - Fork 20
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
[DPE-5706] remove clutter from singlestat panels in cos #702
base: main
Are you sure you want to change the base?
Conversation
@@ -212,7 +212,7 @@ | |||
"tableColumn": "", | |||
"targets": [ | |||
{ | |||
"expr": "process_start_time_seconds{release=\"$release\", instance=\"$instance\"} * 1000", | |||
"expr": "min(process_start_time_seconds{release=\"$release\", instance=\"$instance\"} * 1000) by (label)", |
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.
Picks the oldest start time across the selected units.
@@ -246,7 +246,7 @@ | |||
}, | |||
"editorMode": "code", | |||
"exemplar": false, | |||
"expr": "patroni_dcs_last_seen{service_name=~\"$service_name\",scope=~\"$scope_name\"}*1000", | |||
"expr": "max(patroni_dcs_last_seen{service_name=~\"$service_name\",scope=~\"$scope_name\"}*1000) by (label)", |
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.
Picks the most recent Last Seen
time across selected units
@@ -826,7 +826,7 @@ | |||
}, | |||
"editorMode": "code", | |||
"exemplar": false, | |||
"expr": "patroni_postmaster_start_time{service_name=~\"$service_name\",scope=~\"$scope_name\"}*1000", | |||
"expr": "min(patroni_postmaster_start_time{service_name=~\"$service_name\",scope=~\"$scope_name\"}*1000) by (label)", |
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.
picks the oldest start time across selected units
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #702 +/- ##
=======================================
Coverage 71.82% 71.82%
=======================================
Files 13 13
Lines 3219 3219
Branches 477 477
=======================================
Hits 2312 2312
Misses 791 791
Partials 116 116 ☔ View full report in Codecov by Sentry. |
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.
Those changes make sense to me.
Issue
This PR focuses on addressing #656 in particular.
Solution
This comes down to select the appropriate value (amongst the possible
juju-unit
labels) and display it on the singlestat panel. There are 3 main cases:avg
ormin/max
doesn't work, hence the usage oftopk(1, <version_metric>)
to just pick a value.max
or oldestmin
timestamp among the possible unit's values. Depends on the metric, will put comments on what was chosen and where.min/max
, just in case they end up being different. Here, I chose to pick the largest value by default.Please, let me know if all this makes sense!