You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @peterbourgon!
We are using statsd for metrics, and it seems we found a mismatch in time units between metrics/statsd.Timingand metrics.Timer.
Timer's ObserveDuration method calculate the elapsed time in seconds and passes it to the underlying Histogram's Observe method, that in case of statsd.Timing requires the parameter in milliseconds.
It would be nice to have the chance to specify the time unit measure for ObserveDuration in Timer constructor or at least to be compliant with the underlying method.
The text was updated successfully, but these errors were encountered:
metrics.Timer was not built to be compatible with statsd.Timing! But I would be happy to accept a PR that changed the unit on a metrics.Timer. So as not to needlessly break the API, I guess it should be implemented as a new method on the Timer struct, e.g. Unit(time.Duration), with an implied default of time.Second.
Hi @peterbourgon!
We are using statsd for metrics, and it seems we found a mismatch in time units between
metrics/statsd.Timing
andmetrics.Timer
.Timer's
ObserveDuration
method calculate the elapsed time in seconds and passes it to the underlying Histogram'sObserve
method, that in case ofstatsd.Timing
requires the parameter in milliseconds.It would be nice to have the chance to specify the time unit measure for
ObserveDuration
in Timer constructor or at least to be compliant with the underlying method.The text was updated successfully, but these errors were encountered: