Skip to content
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

Bulk Distribution Metric #2312

Open
mu4farooqi opened this issue May 16, 2024 · 2 comments
Open

Bulk Distribution Metric #2312

mu4farooqi opened this issue May 16, 2024 · 2 comments

Comments

@mu4farooqi
Copy link

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.

@sl0thentr0py
Copy link
Member

@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. :)

@getsantry
Copy link

getsantry bot commented Jun 12, 2024

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 🥀

@getsantry getsantry bot added the Stale label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Development

No branches or pull requests

2 participants