Coming soon. The Rails SDK is not published yet. Until it is, the same calls work today over the REST API (curl or fetch). See the HTTP equivalent
Integration
Report incidents, update components, and send heartbeats from your Rails application. One gem. Zero configuration.
$ gem "beacon-rails"
Quick Start
gem "beacon-rails"
$ bundle install
Create an initializer file
# config/initializers/beacon.rb
Beacon.configure do |config|
config.token = ENV["BEACON_API_TOKEN"]
config.base_url = ENV.fetch("BEACON_BASE_URL", "https://app.usebeacon.pro")
config.page_slug = ENV["BEACON_PAGE_SLUG"]
end
Beacon.create_incident(
title: "Service degradation detected",
impact: "minor"
)
Code Examples
Create an incident on your status page from anywhere in your app.
Beacon.create_incident(
title: "Database connection errors",
impact: "major",
state: "investigating",
message: "Elevated connection timeouts from primary DB."
)
Beacon.update_component(component_id, status: "degraded")
Beacon.resolve_incident(incident_id,
message: "Database connections restored after failover."
)
class InvoiceProcessingJob
include Sidekiq::Job
def perform
process_invoices
Beacon.heartbeat("invoice-processing-token")
end
end
# config/routes.rb
get "/health", to: proc { [200, {}, [{ status: "ok" }.to_json]] }
class ApplicationController < ActionController::Base
rescue_from StandardError do |e|
if e.is_a?(CriticalDatabaseError)
Beacon.create_incident(
title: "Critical database failure",
impact: "critical"
)
end
raise e
end
end
Features
Zero dependencies
Uses Net::HTTP from the Ruby standard library. No extra gems.
Thread-safe async mode
Non-blocking API calls that work safely in multi-threaded environments.
Auto-configures from ENV
Reads credentials from environment variables automatically.
Rails 7+ and Ruby 3.1+
Tested across all current active Rails and Ruby releases.
Add the gem, configure your token, and ship status updates from your codebase.
Also available: Laravel → / Node.js → / WordPress →
We use essential cookies for sign-in and security. Cookie policy