Notable
Track notable requests and background jobs
Install / Use
/learn @ankane/NotableREADME
Notable
Notable tracks notable requests and background jobs and stores them in your database. What makes a request or job notable? There are a number of default situations, but ultimately you decide what interests you.
By default, Notable tracks:
- errors
- 404s
- slow requests and jobs
- timeouts
- validation failures
- CSRF failures
- unpermitted parameters
- blocked and throttled requests
You can track custom notes as well.
:tangerine: Battle-tested at Instacart
Installation
Add this line to your application’s Gemfile:
gem "notable"
And run:
rails generate notable:requests
rails generate notable:jobs
rails db:migrate
To explore the data, check out Blazer.
How It Works
A Notable::Request is created for:
- errors
- 404s
- slow requests
- timeouts from Slowpoke
- validation failures
- CSRF failures
- unpermitted parameters
- blocked and throttled requests from Rack Attack
A Notable::Job is created for:
- errors
- slow jobs
- validation failures
Create a custom note inside a request or job with:
Notable.track("Note Type", "Optional extra info")
Customization
Disable tracking in certain environments
Notable.enabled = Rails.env.production?
Requests
Set slow threshold
Notable.slow_request_threshold = 5.seconds
Custom user method
Notable.user_method = lambda do |env|
env["warden"].try(:user) || env["action_controller.instance"].try(:current_visit)
end
Custom track method
Notable.track_request_method = lambda do |data, env|
Notable::Request.create!(data)
end
Skip tracking CSRF failures
skip_before_action :track_unverified_request
Anonymize IP addresses
Notable.mask_ips = true
Jobs
Set slow threshold
Notable.slow_job_threshold = 60.seconds
To set a threshold for a specific job, use:
class CustomJob < ApplicationJob
def notable_slow_job_threshold
5.minutes
end
end
Custom track method
Notable.track_job_method = lambda do |data|
Notable::Job.create!(data)
end
History
View the changelog
Contributing
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
To get started with development:
git clone https://github.com/ankane/notable.git
cd notable
bundle install
bundle exec rake test
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
