PlatformsRuby

Ruby

Capture exceptions from Rails, Sinatra, and Sidekiq with sentry-ruby pointed at Epure.

Use official sentry-ruby (fixture captured at 5.18.0). Point dsn at your Epure host. No Epure gem.

Use this guide when the process is Ruby: Rails, Sinatra, Sidekiq, scripts. Do not use this for JS/TS (→ Next.js). Full map: Pick your SDK.

Capture exceptions in Ruby

Install sentry-ruby (and sentry-rails / sentry-sidekiq if you already use them), call Sentry.init once, then raise or capture_exception. Envelope ingest. Grouping uses raw frames.

How do I install sentry-ruby?

gem install sentry-ruby

In a Gemfile, keep sentry-rails and sentry-sidekiq if they are already there. Only the DSN host changes.

Init the Ruby SDK

Sentry.init do |config|
  config.dsn = ENV.fetch("SENTRY_DSN")
  config.environment = "local"
  config.release = "my-app@0.0.0"
  config.traces_sample_rate = 0.0
  config.profiles_sample_rate = 0.0
end

Local compose DSN shape:

http://YOUR_PUBLIC_KEY@localhost:8080/YOUR_PROJECT_ID
OptionValue
dsnRequired: public key + Epure host + project UUID
environmentTag for the dashboard filter strip
releaseVersion string on the issue
traces_sample_rate0; transactions discarded
profiles_sample_rate0; profiles discarded

Rack middleware and sentry-rails stay. Unrescued controller exceptions still post envelopes after the DSN swap. Sidekiq can share the web project or use a second DSN.

How do I capture handled errors?

begin
  risky
rescue => e
  Sentry.capture_exception(e)
  raise
end

What should I see after ingest?

202, then an issue whose title matches the exception class and message, with a stack as sentry-ruby sent it.

Why does Ruby never send?

What you seeWhat to do
401 / 403Recopy the DSN from Settings → SDK connection
202, empty IssuesMatch the environment chip to config.environment
Job throws missingInit the SDK in the Sidekiq process, not only rails server

Next

Does Epure demangle Ruby stacks?

No. There is no Ruby symbol server. Grouping uses file, method, and line as sentry-ruby sends them. Confirm with Verify.

Are traces stored?

No. Set traces_sample_rate and profiles_sample_rate to 0. Those item types are discarded on ingest. Exception events plus breadcrumbs stay.