Guide overview
Use the gem when you want the fastest Ruby integration path.
The Ruby integration is the most direct path for Rails apps. It gives you a native setup flow for errors, metrics, logs, and check-ins with very little application code.
After reading this guide, you will know:
- How to create a project and generate the API token you need.
- How to install and configure
logister-ruby. - How to wire your app to the ingest endpoint safely with environment variables.
- How to enable database timing metrics for the performance views.
Before you start
Create the project with the `Ruby gem` integration type.
In Logister, choose Ruby gem for the project integration type. That makes the project settings page show Ruby-specific setup instructions and links back to this public guide.
| What you need | Why it matters |
|---|---|
| Project API token | Authenticates your app when sending events |
| Hosted Logister base URL | Used to build the ingest endpoint |
| Ruby app with Bundler | Lets you install and configure logister-ruby |
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.
If you only want error capture at first, ship the base config first and add database metrics later. That keeps the first rollout small and easy to verify.
Install
Add the gem
1. Add the dependency
gem "logister-ruby", "~> 0.1.2"2. Install the gem
bundle installAdd the gem to your app, install dependencies, then restart the web process so the configuration initializer loads.
Configure
Point the gem at your Logister project
Create the initializer directory if needed
mkdir -p config/initializersMinimal configuration
Logister.configure do |config|
config.api_key = "your-project-api-token"
config.endpoint = "https://your-logister-host.example/api/v1/ingest_events"
end
The API token is shown once when you create it in project settings, and the endpoint should be your hosted
Logister base URL plus /api/v1/ingest_events.
Recommended initializer
# config/initializers/logister.rb
Logister.configure do |config|
config.api_key = ENV.fetch("LOGISTER_API_KEY")
config.endpoint = ENV.fetch("LOGISTER_ENDPOINT")
endUsing environment variables keeps tokens out of source control and makes it easier to promote the same setup across environments.
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
endThis is the easiest way to populate the Logister performance view with `db.query` timing data.
What these settings control
| 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 |
What to verify after rollout
Performance page checklist
transactions visible
db.query samples flowing
no missing API token errorsAfter rollout, open the project performance page and confirm you see transaction volume first, then query timing data.