Skip to content
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

metrics: support labeled gauges #5956

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

algorandskiy
Copy link
Contributor

Summary

Generalize counter code that supports labeled and non-labeled values into a new common couge (COUnter + gaUGE) type. This is needed by p2p branch to export number of labeled metrics.

Existing behavior change:

  1. values without tags now exported as metric_name 123 instead of metric_name{} 123

Test Plan

Added new unites tests.

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 97.60000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 55.74%. Comparing base (dd22cff) to head (a1ad89f).
Report is 17 commits behind head on master.

Files Patch % Lines
util/metrics/couge.go 97.97% 1 Missing and 1 partial ⚠️
util/metrics/gauge.go 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5956      +/-   ##
==========================================
+ Coverage   55.71%   55.74%   +0.03%     
==========================================
  Files         489      490       +1     
  Lines       68111    68124      +13     
==========================================
+ Hits        37946    37979      +33     
+ Misses      27590    27577      -13     
+ Partials     2575     2568       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

gmalouf
gmalouf previously approved these changes Mar 21, 2024
util/metrics/gauge.go Outdated Show resolved Hide resolved
util/metrics/gauge.go Outdated Show resolved Hide resolved
@algorandskiy algorandskiy merged commit 93ab758 into algorand:master Mar 22, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants