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-rubyIn 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
endLocal compose DSN shape:
http://YOUR_PUBLIC_KEY@localhost:8080/YOUR_PROJECT_ID| Option | Value |
|---|---|
dsn | Required: public key + Epure host + project UUID |
environment | Tag for the dashboard filter strip |
release | Version string on the issue |
traces_sample_rate | 0; transactions discarded |
profiles_sample_rate | 0; 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
endWhat 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 see | What to do |
|---|---|
| 401 / 403 | Recopy the DSN from Settings → SDK connection |
| 202, empty Issues | Match the environment chip to config.environment |
| Job throws missing | Init 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.