-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
ScheduledReporter queues up runnables when gauge is slow #1524
Labels
Milestone
Comments
I think this is a good idea. If they gauge is slow, one should use CachedGauge, but sometimes this can happen unexpectedly on production. Those reporting burst are undesired. |
Should this issue be resolved by #1590? |
Yes! Thank you. |
mikebell90
added a commit
to mikebell90/metrics
that referenced
this issue
Oct 15, 2022
dropwizard#1524 introduced a fix to queuing issues and ends up doing atFixedDelay rather than atFixedRate. Issues with binning exist in Graphite (and probably others). See dropwizard#2664
joschi
pushed a commit
to mikebell90/metrics
that referenced
this issue
Nov 16, 2022
dropwizard#1524 introduced a fix to queuing issues and ends up doing atFixedDelay rather than atFixedRate. Issues with binning exist in Graphite (and probably others). See dropwizard#2664
joschi
pushed a commit
to mikebell90/metrics
that referenced
this issue
Dec 9, 2022
dropwizard#1524 introduced a fix to queuing issues and ends up doing atFixedDelay rather than atFixedRate. Issues with binning exist in Graphite (and probably others). See dropwizard#2664
joschi
pushed a commit
that referenced
this issue
Dec 9, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem Statement
The current implementation of
ScheduledReporter
relies on aScheduledExecutorService
scheduled at fixed rate:Every
period
, a thread will report, except when one of the Gauge implementations (getValue()
) is slower than thatperiod
(for example, network latency). In that case, threads will start to accumulate. When the latency is resolved, there will be a spike of report requests.Reproducible Scenario
To reproduce, have:
You will get reports at 0, 10, 20, 30, 30, 30, 30, 35, and 40.
Possible solution
I suggest to replace
executor.scheduleAtFixedRate
withexecutor.scheduleWithFixedDelay
, so that the next call toreport
is separated byperiod
with respect to the previous call, instead of having an absoluteperiod
.The text was updated successfully, but these errors were encountered: