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 and deployment endpoints |
| Ruby app with Bundler | Lets you install and configure logister-ruby |
| Optional GitHub App installation | Lets Logister use repository, commit_sha, branch, and deployment records for source excerpts and deploy links |
What you get
Use the Ruby integration to start with errors, then add performance and deploy 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, source, 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. |
| Resolve source and deploy history | repository, commit_sha, branch, release, and deployment records that let Logister show source excerpts, GitHub links, and "started after deploy" context when the GitHub App is connected. |
| 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, Logister ingest endpoint, environment, release, and source context.
- Optionally enable DB metrics for performance visibility.
- From CI/CD, call
Logister.record_deploymentafter a successful deploy so releases map to exact commits.
Tip
If you only want error capture at first, ship the base config first and add source context, deployment records, and database metrics next.
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, check-ins, and deployment records 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.8"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.repository = ENV["LOGISTER_REPOSITORY"] || ENV["GITHUB_REPOSITORY"]
config.commit_sha = ENV["LOGISTER_COMMIT_SHA"] || ENV["GITHUB_SHA"]
config.branch = ENV["LOGISTER_BRANCH"] || ENV["GITHUB_REF_NAME"]
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.
Source and deployments
Record the deployed commit when CI/CD knows it.
If the project is connected to the GitHub App, Logister can use source context to resolve Ruby and Rails stack frames to repository files. Deployment records tell Logister which commit was deployed for a release and environment.
Logister.record_deployment(
release: ENV.fetch("LOGISTER_RELEASE"),
environment: ENV.fetch("LOGISTER_ENVIRONMENT", Rails.env),
repository: ENV.fetch("LOGISTER_REPOSITORY", "acme/checkout"),
commit_sha: ENV.fetch("LOGISTER_COMMIT_SHA", ENV["GITHUB_SHA"]),
branch: ENV["LOGISTER_BRANCH"] || ENV["GITHUB_REF_NAME"],
deployed_at: Time.now.utc.iso8601,
release_tag: ENV["GITHUB_REF_NAME"],
workflow_run_url: ENV["GITHUB_RUN_ID"] && "https://github.com/#{ENV["GITHUB_REPOSITORY"]}/actions/runs/#{ENV["GITHUB_RUN_ID"]}"
)| Field | Set it from | Used for |
|---|---|---|
repository | LOGISTER_REPOSITORY or GITHUB_REPOSITORY | Finds the GitHub repository connected to the project. |
commit_sha | LOGISTER_COMMIT_SHA or GITHUB_SHA | Resolves stack frames and deployment context to the exact commit. |
branch | LOGISTER_BRANCH or GITHUB_REF_NAME | Falls back when an event has no commit or deployment record yet. |
release | Your app version, build ID, tag, or package version | Connects event filters, release health, and deployments. |
config.deployment_endpoint defaults to the configured ingest endpoint with /ingest_events replaced by /deployments. Set LOGISTER_DEPLOYMENT_ENDPOINT only when that endpoint cannot be derived from LOGISTER_ENDPOINT.
Verify it
After a deploy, send one test exception with the same release. Open the event detail and check for source lookup status, deployment context, and GitHub links. If source is missing, confirm the GitHub App is installed for the repository and that the event has repository plus either commit_sha or a matching deployment record.
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
source context visible on events when configured
deployment context visible after Logister.record_deployment runs
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.