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

Add support for optional metric values via Option<_> #31975

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

jbiseda
Copy link
Contributor

@jbiseda jbiseda commented Jun 5, 2023

Problem

Optionally logging specific values would be useful to reduce metrics spam for default values.

Summary of Changes

Add support to supply metric values as Option<_> types which will only log Some(_) values.

Fixes #

@jbiseda jbiseda marked this pull request as ready for review June 5, 2023 20:28
@jbiseda jbiseda requested review from yhchiang-sol and steviez June 5, 2023 20:28
@codecov
Copy link

codecov bot commented Jun 5, 2023

Codecov Report

Merging #31975 (0ec2e19) into master (8fbada4) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #31975     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         760      760             
  Lines      207513   207543     +30     
=========================================
  Hits       170068   170068             
- Misses      37445    37475     +30     

Copy link
Contributor

@steviez steviez left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for breaking out into separate PR and for the unit test as well!

@jbiseda jbiseda merged commit 6371240 into solana-labs:master Jun 5, 2023
@jbiseda jbiseda deleted the add-option-to-metrics branch June 5, 2023 22:01
@jbiseda jbiseda added the v1.16 PRs that should be backported to v1.16 label Aug 1, 2023
mergify bot pushed a commit that referenced this pull request Aug 1, 2023
jbiseda added a commit that referenced this pull request Aug 1, 2023
… of #31975) (#32675)

Add support for optional metric values via Option<_> (#31975)

(cherry picked from commit 6371240)

Co-authored-by: Jeff Biseda <jbiseda@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.16 PRs that should be backported to v1.16
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants