rails-informant 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -0
  3. data/lib/rails_informant.rb +6 -14
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 452521455f3505485bde1a549f773545c459f78ecae46aea7aa1844a19cdc77c
4
- data.tar.gz: 6c74d39ca5094a26bec34cd98fb7c0a8fbbdf0d6ac940265bef79484ab5e53d0
3
+ metadata.gz: 6d0af47e9b626dfed7bcf7a29cb9817ff2fd41ada4700a61a0fab3579c863742
4
+ data.tar.gz: e130792dad9233646126fed6bcac17c339e50f5aeb566710307661078a0f7772
5
5
  SHA512:
6
- metadata.gz: c0dafe1256811528cc18da9566369a8186e028fa4aaa8746ec2be68f6b1f533ffaebc369ec192e9d8e5ff282a15a49c87c4b40a58633054f1ea629d617036f71
7
- data.tar.gz: ae248c9b2c78ed8d6e71d280c743144d75d6aef77459b1aecdd9be251f7bd7949593d96e35cdc018a9004b31b8c822cbc118cef426395c8a16656891b4269c77
6
+ metadata.gz: ab3256ce6ae5de9d3356346d9e5b4c0988f5170439b54a77945051980164a67e2c9e37a6ced0de22e7e68271ac3b5053a1292f4de8cc9f8c5c895e1aad651d0c
7
+ data.tar.gz: 46530d277944774af55b2b0012d45a76e471c690d35e5324385ade0a2c9cc67704dfcbf0aa545c4172dba8c75f031d00ee591478b8fd6cb2669a54ddeed42295
data/README.md CHANGED
@@ -100,6 +100,25 @@ Every option can be set via an environment variable. The initializer takes prece
100
100
 
101
101
  ## Noise Suppression
102
102
 
103
+ ### Default Ignored Exceptions
104
+
105
+ Informant ignores only exceptions that are noise in **every** context: `SignalException`
106
+ and `SystemExit` (process control), plus a few client/tamper errors
107
+ (`Rack::Utils::InvalidParameterError`, `Mime::Type::InvalidMimeType`,
108
+ `CGI::Session::CookieStore::TamperedWithCookie`).
109
+
110
+ It deliberately does **not** ignore Rails' HTTP client errors -- `RecordNotFound`,
111
+ `RoutingError`, `ParameterMissing`, and the rest of the 4xx family. On the request path
112
+ Rails already maps those to responses (404, 422, ...) and never reports them to
113
+ `Rails.error`, so suppressing them again here was redundant. Off the request path -- in a
114
+ **background job**, a rake task, or wrapped as the cause of another error -- those same
115
+ exceptions are real bugs, so Informant records them. A job that dies on an
116
+ `ActiveJob::DeserializationError` caused by a missing record now alerts instead of
117
+ vanishing silently.
118
+
119
+ Add your own classes with `config.ignored_exceptions`; it still walks the cause chain, so
120
+ ignoring a class also ignores exceptions that wrap it.
121
+
103
122
  ### Silenced Blocks
104
123
 
105
124
  ```ruby
@@ -5,25 +5,17 @@ module RailsInformant
5
5
  InvalidParameterError = Class.new(StandardError)
6
6
  NotifierError = Class.new(StandardError)
7
7
 
8
+ # Only exceptions that are noise in *every* context. Rails 8.1 maps HTTP
9
+ # client errors (404s, routing, bad params) via rescue_responses and never
10
+ # reports them to Rails.error on the request path, so listing them here was
11
+ # redundant for requests and wrongly suppressed the same exceptions when they
12
+ # are real bugs in background jobs (e.g. a job's RecordNotFound). Those are
13
+ # recorded now; what remains is process-control and client/tamper noise.
8
14
  IGNORED_EXCEPTIONS_DEFAULT = %w[
9
- AbstractController::ActionNotFound
10
- ActionController::BadRequest
11
- ActionController::InvalidAuthenticityToken
12
- ActionController::InvalidCrossOriginRequest
13
- ActionController::MethodNotAllowed
14
- ActionController::NotImplemented
15
- ActionController::ParameterMissing
16
- ActionController::RoutingError
17
15
  ActionController::UnknownAction
18
- ActionController::UnknownFormat
19
- ActionController::UnknownHttpMethod
20
16
  ActionController::UrlGenerationError
21
- ActionDispatch::Http::MimeNegotiation::InvalidType
22
- ActiveRecord::RecordNotFound
23
17
  CGI::Session::CookieStore::TamperedWithCookie
24
18
  Mime::Type::InvalidMimeType
25
- Rack::QueryParser::InvalidParameterError
26
- Rack::QueryParser::ParameterTypeError
27
19
  Rack::Utils::InvalidParameterError
28
20
  SignalException
29
21
  SystemExit
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-informant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel López Prat