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

Added support for incrementing by a specified value #50

Merged
merged 3 commits into from
Jul 27, 2023

Conversation

brent-statsig
Copy link
Contributor

@brent-statsig brent-statsig commented Jul 25, 2023

It is fairly common to increment a counter by a known amount, instead of just by 1. This adds API support for that use case

API added

  • incr_by_value(stat, value, tags)
  • decr_by_value(stat, value, tags)

Copy link
Owner

@mcasper mcasper left a comment

Choose a reason for hiding this comment

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

@brent-statsig Thank you for the contribution! Just a couple small changes and I think this will be good to go

src/lib.rs Outdated Show resolved Hide resolved
src/metrics.rs Outdated Show resolved Hide resolved
@brent-statsig
Copy link
Contributor Author

Addressed comments, let me know if you need anything else! I appreciate the fast review

@mcasper
Copy link
Owner

mcasper commented Jul 27, 2023

Looks good, thanks so much!

@mcasper mcasper merged commit 5eb2fbf into mcasper:master Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants