Before you start
Create the project with the Ruby integration type.
| What you need | Why it matters |
|---|---|
| Project API token | Authenticates your app when sending events |
| Logister instance base URL | Used to build the ingest endpoint |
| Ruby app with Bundler | Lets you install and configure logister-ruby |
What you get
Use the Ruby integration to start with errors, then add performance signals.
| Need | What appears in Logister |
|---|---|
| See Ruby and Rails failures in one place | Error groups in the project inbox with stacktrace details, request context, occurrence history, and triage actions. |
| Find repeated problems | Grouped issues based on fingerprints or consistent messages, with first-seen and last-seen history. |
| Capture useful manual errors | Manual Logister.report_error calls include runtime, deployment, breadcrumb, dependency, user, and nested exception cause context. |
| Understand request load | Optional Rails request spans that feed request load waterfall charts on the performance page. |
| Understand database pressure | db.query metric events that power database load cards on the performance page when database metrics are enabled. |
| Track deploy context | Environment and release metadata that helps release health and regression tracking become useful. |
| Watch custom operations | Logs, metrics with value/unit context, transactions, spans, and check-ins in activity, performance, and monitor views. |
Setup flow
Recommended installation path
- Create the project and generate an API key.
- Add
logister-rubyto the application. - Configure the API key and Logister ingest endpoint.
- Optionally enable DB metrics for performance visibility.
Tip
If you only want error capture at first, ship the base config first and add database metrics later.
Install
Install logister-ruby from RubyGems.
Use the published package when you want a Ruby app or Rails service to send errors, logs, metrics, transactions, spans, and check-ins into Logister through Bundler or RubyGems. The RubyGems listing is the canonical package page for install commands, version history, and package metadata.
gem "logister-ruby", "~> 0.2.6"bundle install
gem install logister-rubyConfigure
Point the gem at your Logister project.
mkdir -p config/initializersLogister.configure do |config|
config.api_key = ENV.fetch("LOGISTER_API_KEY")
config.endpoint = ENV.fetch("LOGISTER_ENDPOINT")
config.environment = Rails.env
config.release = ENV["LOGISTER_RELEASE"]
config.capture_request_spans = true
endThe endpoint should be your Logister instance base URL plus /api/v1/ingest_events. The ingest endpoint accepts 1,200 requests per minute per API token by default and returns 429 Too Many Requests with retry headers when that limit is exceeded.
Important
The API token is only shown once in project settings. Store it in your environment or secret manager before you navigate away.
Metrics
Enable DB timing metrics when needed.
Logister.configure do |config|
config.capture_db_metrics = true
config.db_metric_min_duration_ms = 10.0
config.db_metric_sample_rate = 1.0
end| Setting | Purpose |
|---|---|
capture_db_metrics | Turns database timing capture on |
db_metric_min_duration_ms | Filters out very fast queries |
db_metric_sample_rate | Controls how much query traffic is reported |
Manual metrics and check-ins
Logister.report_metric(
message: "queue.depth",
value: 12,
unit: "jobs",
context: { queue: "emails" }
)
Logister.report_check_in(
slug: "nightly-reconcile",
status: "ok",
expected_interval_seconds: 900,
duration_ms: 248.3,
release: ENV["LOGISTER_RELEASE"],
trace_id: "trace-123",
request_id: "req-123"
)Performance page checklist
transactions visible
db.query samples flowing
request spans visible
no missing API token errorsUseful examples
Add the context that makes Ruby events easier to triage.
Attach breadcrumbs and dependency calls before an error
Logister.add_breadcrumb(
category: "checkout",
message: "Starting payment authorization",
data: { order_id: 123 }
)
Logister.add_dependency(
name: "stripe.charge",
host: "api.stripe.com",
method: "POST",
status: 200,
duration_ms: 184.7,
kind: "http"
)Report worker spans and a transaction
trace_id = SecureRandom.hex(16)
root_span_id = SecureRandom.hex(8)
Logister.report_transaction(
name: "billing.reconcile",
duration_ms: 1840.7,
context: { trace_id: trace_id, queue: "billing", service: "billing-worker" }
)
Logister.report_span(
name: "billing.reconcile",
duration_ms: 1840.7,
trace_id: trace_id,
span_id: root_span_id,
kind: "server",
status: "ok",
context: { queue: "billing" }
)
Logister.report_span(
name: "load invoices",
duration_ms: 430.2,
trace_id: trace_id,
parent_span_id: root_span_id,
kind: "db",
status: "ok",
context: { queue: "billing" }
)Use breadcrumbs for the steps leading to an exception, dependency calls for outbound services, transactions for total work duration, and spans for the pieces of that work that should appear in request load waterfall charts.