Add increase operation to calc Total triggered deploys#5595
Merged
Conversation
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5595 +/- ##
==========================================
- Coverage 26.25% 26.25% -0.01%
==========================================
Files 472 472
Lines 50388 50388
==========================================
- Hits 13230 13228 -2
- Misses 36097 36100 +3
+ Partials 1061 1060 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Warashi
commented
Feb 21, 2025
| { | ||
| "exemplar": true, | ||
| "expr": "sum by (project) (grpcapi_create_deployment_total)", | ||
| "expr": "sum by (project) (increase(grpcapi_create_deployment_total[24h]))", |
Member
Author
There was a problem hiding this comment.
I think the increase of a counter metric must be an integer, but I'll add the ceil operation for safety.
… totals Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Warashi
commented
Feb 21, 2025
| { | ||
| "exemplar": true, | ||
| "expr": "sum by (project) (grpcapi_create_deployment_total)", | ||
| "expr": "sum by (project) (round(increase(grpcapi_create_deployment_total[24h])))", |
Member
Author
There was a problem hiding this comment.
I found some floating-point numbers in the results, and adding round behaves as expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
This PR fixes the Grafana dashboard to use the
increaseoperation when calculating the total triggered deployments in the last 24 hours.Why we need it:
The metric
grpcapi_create_deployment_totalis a counter metric, so we have to use theincreaseoperation to view it correctly.Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: Yes
How are users affected by this change:
The control plane managers who use the monitoring feature.
Is this breaking change:
How to migrate (if breaking change):