Before you start
Create the project with the Ruby gem integration type.
| 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.
Tip
If you only want error capture at first, ship the base config first and add database metrics later.
Install
Add the gem
ruby
gem "logister-ruby", "~> 0.1.2"shell
bundle installConfigure
Point the gem at your Logister project.
shell
mkdir -p config/initializersruby
Logister.configure do |config|
config.api_key = ENV.fetch("LOGISTER_API_KEY")
config.endpoint = ENV.fetch("LOGISTER_ENDPOINT")
endThe endpoint should be your hosted Logister base URL plus /api/v1/ingest_events.
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.
ruby
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 |
Verification
Performance page checklist
transactions visible
db.query samples flowing
no missing API token errors