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
Metrics update in application's hot path may be expensive. Some heavy-loaded web servers or processing pipelines usually serve hundreds of thousands of events per second, and to have the visibility they also increment a bunch of metrics for each event. It would be cool, if metrics package could have native sampling support. For example:
Every call to requestsTotal.Inc() will have 10% chance to actually increment the counter, and 90% chance to do nothing. But when increment actually happens, it will be +=10 instead of +=1.
Workaround. Batch metrics updates in a hot path and make them periodic (e.g. every 100ms) with a fixed rate.
The text was updated successfully, but these errors were encountered:
It would be great to have performance numbers and/or cpu profiles obtained from highly loaded systems where metrics sampling could result in better performance.
Metrics update in application's hot path may be expensive. Some heavy-loaded web servers or processing pipelines usually serve hundreds of thousands of events per second, and to have the visibility they also increment a bunch of metrics for each event. It would be cool, if metrics package could have native sampling support. For example:
Every call to
requestsTotal.Inc()
will have 10% chance to actually increment the counter, and 90% chance to do nothing. But when increment actually happens, it will be+=10
instead of+=1
.Workaround. Batch metrics updates in a hot path and make them periodic (e.g. every 100ms) with a fixed rate.
The text was updated successfully, but these errors were encountered: