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

Do not panic on metrics operations that statsd does not support #46

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

jorendorff
Copy link
Contributor

@jorendorff jorendorff commented Jan 12, 2024

Remove panics when an application uses a method like Counter::absolute() which Statsd does not support.

The panics were at least very in-your-face so users would know that something is wrong; but it's more important for this crate to serve as a drop-in replacement for other metrics exporters.

Added this warning to the docs:

  • [metrics::Counter::absolute], [metrics::Gauge::increment], and
    [metrics::Gauge::decrement] are not supported. Statsd doesn't have these concepts.
    Unfortunately this means that if the application is using these methods, the metrics will
    silently be missing or wrong.

Copy link
Contributor

@mbellani mbellani left a comment

Choose a reason for hiding this comment

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

yes! Thanks

@jorendorff jorendorff merged commit a1b6124 into main Jan 12, 2024
@jorendorff jorendorff deleted the jorendorff/remove-panics branch January 12, 2024 16:13
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