-
Notifications
You must be signed in to change notification settings - Fork 680
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
Flush metrics on exit #749
Flush metrics on exit #749
Conversation
In PushController before exit, flush the meter by calling tick()
@lzchen I have one concern about this flushing. On exit, the PushController's time interval would be cut short, creating an aggregation over a shorter period. This could accidentally look like an outlier e.g. if you were measuring QPS with a Counter and PushController interval of 1 second, but the flushed measurement was cut at 0.1 seconds. Many aggregators have a |
Python 3.5 doesn't have `assert_called_once()`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a non-blocking comment.
@aabmass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the contribution!
* chore: rename registry to provider * chore: revert changelog modification * chore: remove examples and getting started from rename
For #664, in PushController before exit, flush the meter by calling
tick()
.Metrics are batched in the
meter
and flushed eachtick()
of the PushController. The fix is to additionally calltick()
before exiting.