Skip to content

Add increase operation to calc Total triggered deploys#5595

Merged
Warashi merged 3 commits intomasterfrom
fix-grafana-dashboard
Feb 25, 2025
Merged

Add increase operation to calc Total triggered deploys#5595
Warashi merged 3 commits intomasterfrom
fix-grafana-dashboard

Conversation

@Warashi
Copy link
Member

@Warashi Warashi commented Feb 21, 2025

What this PR does:

This PR fixes the Grafana dashboard to use the increase operation when calculating the total triggered deployments in the last 24 hours.

Why we need it:

The metric grpcapi_create_deployment_total is a counter metric, so we have to use the increase operation 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):

Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
@Warashi Warashi marked this pull request as ready for review February 21, 2025 02:16
@codecov
Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 26.25%. Comparing base (ad00a56) to head (4b55444).
Report is 239 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

khanhtc1202
khanhtc1202 previously approved these changes Feb 21, 2025
Copy link
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch 👍

@Warashi Warashi enabled auto-merge (squash) February 21, 2025 02:38
{
"exemplar": true,
"expr": "sum by (project) (grpcapi_create_deployment_total)",
"expr": "sum by (project) (increase(grpcapi_create_deployment_total[24h]))",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
{
"exemplar": true,
"expr": "sum by (project) (grpcapi_create_deployment_total)",
"expr": "sum by (project) (round(increase(grpcapi_create_deployment_total[24h])))",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some floating-point numbers in the results, and adding round behaves as expected.

@Warashi Warashi requested a review from khanhtc1202 February 21, 2025 04:10
Copy link
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@t-kikuc t-kikuc added the kind/bug Something isn't working as expected label Feb 25, 2025
Copy link
Member

@t-kikuc t-kikuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Warashi Warashi merged commit eb68925 into master Feb 25, 2025
18 checks passed
@Warashi Warashi deleted the fix-grafana-dashboard branch February 25, 2025 04:43
@Warashi Warashi added this to v0.50.3 Mar 14, 2025
@Warashi Warashi moved this to Done in v0.50.3 Mar 14, 2025
@khanhtc1202 khanhtc1202 removed this from v0.50.3 Mar 25, 2025
@khanhtc1202 khanhtc1202 moved this to Done in v0.51.0 Mar 25, 2025
@github-actions github-actions bot mentioned this pull request Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/manifests cherry-pick kind/bug Something isn't working as expected v0.50.3

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants