百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

notable

> 编程语言
开源

跟踪显著的请求和背景任务

455 stars0 点赞4 次浏览
访问官网GitHub

工具介绍

跟踪显著的请求和背景任务

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:

ruby
gem "notable"

And run:

bash
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:

ruby
Notable.track("Note Type", "Optional extra info")

Customization

Disable tracking in certain environments

ruby
Notable.enabled = Rails.env.production?

Requests

Set slow threshold

ruby
Notable.slow_request_threshold = 5.seconds

Custom user method

ruby
Notable.user_method = lambda do |env|
  env["warden"].try(:user) || env["action_controller.instance"].try(:current_visit)
end

Custom track method

ruby
Notable.track_request_method = lambda do |data, env|
  Notable::Request.create!(data)
end

Skip tracking CSRF failures

ruby
skip_before_action :track_unverified_request

Anonymize IP addresses

ruby
Notable.mask_ips = true

Jobs

Set slow threshold

ruby
Notable.slow_job_threshold = 60.seconds

To set a threshold for a specific job, use:

ruby
class CustomJob < ApplicationJob
  def notable_slow_job_threshold
    5.minutes
  end
end

Custom track method

ruby
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:

bash
git clone https://github.com/ankane/notable.git
cd notable
bundle install
bundle exec rake test

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言