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
Today when we report a metric the statsd client emits it immediately.
publicfunc increment(by amount:Int64){self._increment(by: amount)
// https://github.com/b/statsd_spec#counters
// A counter is a gauge calculated at the server. Metrics sent by the client increment or decrement the value of the gauge rather than giving its current value.
// Counters may also have an associated sample rate, given as a decimal of the number of samples per event count. For example, a sample rate of 1/10 would be exported as 0.1.
// Valid counter values are in the range (-2^63^, 2^63^).
_ =self.client.emit(Metric(name:self.id, value: amount, type:.counter))}
This can be overwhelmed easily when we hit counters from many many threads constantly, as each +1 will cause a metric send.
It may be better to debounce a metric a little bit before emitting it.
The text was updated successfully, but these errors were encountered:
Today when we report a metric the statsd client emits it immediately.
This can be overwhelmed easily when we hit counters from many many threads constantly, as each
+1
will cause a metric send.It may be better to debounce a metric a little bit before emitting it.
The text was updated successfully, but these errors were encountered: