Bulk Distribution Metric
mu4farooqi opened this issue · 2 comments
I want to capture metrics in a Sidekiq job where I'm doing batch processing. I'm doing something like following:
time_now = Time.now.utc.to_f
messages.each do |message|
Sentry::Metrics.distribution(
'message_dispatch_latency', time_now - message.created_at.to_f, unit: 'millisecond'
)
end
Is there a better way to do this. Because here if we have 10 messages, we'll make 10 network calls right? Do we have any option to send bulk metrics.
@mu4farooqi that will not send 10 network calls, we locally collect the metrics in a thread and flush them out every 5 seconds. The aggregation / batching is already handled by the SDK. :)
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀