From 4d8195f7832cdf4aebde5fad2ae50709cd4af3c0 Mon Sep 17 00:00:00 2001 From: Aaron Suggs Date: Sat, 28 Jul 2012 22:29:21 -0400 Subject: [PATCH] README: describe instrumentation --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 691a2a9..d5af25e 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,15 @@ Similarly for blacklisted responses: ## Logging & Instrumentation +Rack::Attack uses the [ActiveSupport::Notifications](http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html) API if available. + +You can subscribe to 'rack.attack' events and do whatever: + + ActiveSupport::Notifications.subscribe("rack.attack") do |hash| + # Log it + # Graph it using statsd + end + ## Motivation Abusive clients range from malicious login crackers to naively-written scrapers.