rails-informant 0.4.6 → 0.4.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a778d19578d0a29c371f4b5e8363044db91487e9703db86278944208de434d6
4
- data.tar.gz: 7a60618611f8b9b3d3dcf13385fa720dfd434c6ad3512ed5f70ff072184bbbb7
3
+ metadata.gz: e1238247be3c3dcefa39e50f4907cd23f9e10282fe32cbf480c2bb4d5edd1daa
4
+ data.tar.gz: 51df461568d6e54a3860c52d552f5d365531c65f80005ba025facb0b3ee54e13
5
5
  SHA512:
6
- metadata.gz: 8c0d57e79fb46d2e67ab05e34deb0737638710fdd69acafc25b7ea0b7346225251dcf450819a9d0345afb7961c2ff77bbad66de98e2db8110480b28b41457c10
7
- data.tar.gz: 12f152c83d8d3b7018dad5aaf78e053c4504fc39849dbc0b0ebca9c5bafbb0128af0db53d54f9fb4790d65530225985c8ca0353f77e988ac23587936b8322cc5
6
+ metadata.gz: 02c696395075fd1bfc4b895a916812c512797c64b2031f5d03110b1c636de066043ff26c562112056af1f961da0dffea0e2d6409b1bd5ace298b2f2d7d09ec9d
7
+ data.tar.gz: 1e1c83d7898f5f7f96c9ad4d07682feb67cba4dc915a119d4cc16cda3035b0c7cfae5e890f7479c8593116aaa09ee416d23cfb6a0e0335a972957853f8c9bebe
data/README.md CHANGED
@@ -119,6 +119,13 @@ vanishing silently.
119
119
  Add your own classes with `config.ignored_exceptions`; it still walks the cause chain, so
120
120
  ignoring a class also ignores exceptions that wrap it.
121
121
 
122
+ ### Interactive Console
123
+
124
+ Informant never captures errors raised in an interactive `rails console` session -- nothing
125
+ is recorded and no notifications are sent. You see exceptions live at the prompt, so
126
+ recording and alerting on them would only be noise. This is always on and not configurable.
127
+ Errors from web requests, background jobs, and rake tasks are captured as normal.
128
+
122
129
  ### Silenced Blocks
123
130
 
124
131
  ```ruby
@@ -12,6 +12,9 @@ module RailsInformant
12
12
  end
13
13
 
14
14
  def record(error, severity: "error", context: {}, source: nil, env: nil)
15
+ # Never capture from an interactive console — the operator sees errors
16
+ # live, so recording and alerting on them is noise.
17
+ return if RailsInformant.console_mode?
15
18
  return unless RailsInformant.initialized?
16
19
  return if self_caused_error?(error)
17
20
 
@@ -132,6 +132,10 @@ module RailsInformant
132
132
  error.instance_variable_set(:@__rails_informant_captured, true) unless error.frozen?
133
133
  end
134
134
 
135
+ def console_mode?
136
+ defined?(Rails::Console)
137
+ end
138
+
135
139
  def server_mode?
136
140
  defined?(Rails::Server)
137
141
  end
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.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel López Prat