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

Question: behavior on gauge flush #280

Open
tonyghita opened this issue Apr 26, 2018 · 1 comment
Open

Question: behavior on gauge flush #280

tonyghita opened this issue Apr 26, 2018 · 1 comment

Comments

@tonyghita
Copy link

In statsd's documentation, they note that when not updated, a gauge will flush it's previous value (https://github.com/etsy/statsd/blob/master/docs/metric_types.md#gauges).

Does this behavior exist in statsite? Or will values only be flushed if they've been received within the flush period?

@large-epsilon
Copy link

Gauges will continue to be reported with their previous values. Still, it's best to periodically re-emit them, since they won't be persisted if statsite restarts.

Also, I only know that from having observed the behavior in practice. I just spent like an hour trying to find how gauge values are preserved in the code and couldn't figure it out. It looks like the gauge hashmap is freed during the flush just like everything else in the metrics struct, and I don't see where they're being copied over to the new metrics struct. If anyone knows how that works I'd definitely appreciate if you could update this thread to explain. Thanks!

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

No branches or pull requests

2 participants