bug_reports_client 0.1.2 → 0.1.3

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: fbb8da2de255d2a5894ce7079e462b6cc34d53fd3d4077560a4cb7ef3985df64
4
- data.tar.gz: a01439a1eb84e11e51724dbb6b88456871580c654ede63ca57e261b78ab94c0f
3
+ metadata.gz: cc0b9ca39db5bc33d5bf9fda72ded756fe16e42e877ef5eb93dbd2b833cc6aab
4
+ data.tar.gz: 71195c18c23223ffa3dd5c3669b47549b50ff36756deb3fc46c90fba039f3f6f
5
5
  SHA512:
6
- metadata.gz: ac6b9dd379ca0530da20787480736f05d415fcac662df5ac58e2d52c61ae6054648bc9e0a15a82523e8c1077a4d4e5c9cd03113ad4acd44be7b0499099c96362
7
- data.tar.gz: 780d9c5e1ce19a35eca0c762dc15a0188f7a3be89958f19f540830e7721641b8ec558e0c9ac8ba5850cb1170c3f229d7a473066a41cb66fa5dcb649a8a2d9930
6
+ metadata.gz: 6e125d9c99cfaf74d273509899f1c7e4ec4552b5ebc425552e436b943f47a2ce2d4bd3719aed7fee372fe1fdd98347a3c1c4a5ea76f36ca80c79fe8080d49229
7
+ data.tar.gz: 91125e1ec8de2e57059605f14ab4a2cc4cf705e2ae5ddc7b596381028c841fce299cc928bd828730b3c8be46f88265e04ad5ced9f6001c586a8ec4d57959600a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.3 (7 October 2026)
4
+
5
+ - Unhandled errors raised by `bin/rails runner` scripts (Rails.error source
6
+ `"application.runner.railties"`) are no longer reported. They have no
7
+ application frame, so they all shared one fingerprint and merged into one
8
+ misleading issue. Requests and jobs are still captured. The skipped sources
9
+ are configurable via the new `config.ignored_error_sources` setting.
10
+
3
11
  ## 0.1.2 (16 August 2026)
4
12
 
5
13
  - Resolved-report alerts no longer stack. When a user has two or more
data/README.md CHANGED
@@ -224,6 +224,7 @@ Opt in per host and unhandled 500s become GitHub issues, deduplicated:
224
224
  config.error_reporting_enabled = true
225
225
  config.error_ignore = [] # extra exception class names to skip
226
226
  config.error_throttle_period = 300 # seconds between posts per fingerprint
227
+ config.ignored_error_sources = [ "application.runner.railties" ] # the default
227
228
  ```
228
229
 
229
230
  The engine subscribes to the Rails error reporter, so anything that would
@@ -236,6 +237,15 @@ slowed down. The API keeps one open issue per fingerprint, counting repeat
236
237
  occurrences; when a closed error recurs, a fresh issue is filed (a
237
238
  regression deserves new attention).
238
239
 
240
+ Errors are also skipped when the `source:` Rails passes to the error
241
+ reporter is in `config.ignored_error_sources`. By default that list holds
242
+ `"application.runner.railties"`, the source Rails uses for unhandled errors
243
+ in `bin/rails runner` scripts: the person running the script already sees the
244
+ error in their terminal, and with no application frame in the backtrace
245
+ every such error would share one fingerprint and merge into one misleading
246
+ issue. Requests and jobs are still captured. Add other sources to skip them
247
+ too, or set the list to `[]` to capture runner errors as well.
248
+
239
249
  Captured errors are also attributed to the signed-in user who hit them
240
250
  (stored locally in `bug_report_error_events`, pruned after 30 days). When
241
251
  that user opens the report form within 24 hours, it asks "did this happen
@@ -44,6 +44,10 @@ module BugReportsClient
44
44
  # limits how often one fingerprint is posted from this app.
45
45
  attr_accessor :error_reporting_enabled, :error_ignore, :error_throttle_period
46
46
 
47
+ # Rails.error `source:` values never reported. Defaults to `bin/rails runner`
48
+ # script errors, which the operator sees in the terminal and which lack an app frame.
49
+ attr_accessor :ignored_error_sources
50
+
47
51
  # Optional overrides for the form definition and GitHub issue template.
48
52
  # When nil, the engine looks for config/bug_report_form.yml and
49
53
  # config/bug_report_issue.md in the host app, then falls back to its own
@@ -82,6 +86,7 @@ module BugReportsClient
82
86
  @error_reporting_enabled = false
83
87
  @error_ignore = []
84
88
  @error_throttle_period = 300
89
+ @ignored_error_sources = [ "application.runner.railties" ]
85
90
  end
86
91
 
87
92
  # The URL the API calls back when a report's GitHub issue is closed.
@@ -7,6 +7,8 @@ module BugReportsClient
7
7
  #
8
8
  # - Only unhandled errors are captured, and only ones Rails would answer
9
9
  # with a 5xx (RecordNotFound and friends map to 4xx and are skipped).
10
+ # - Errors from sources in config.ignored_error_sources are skipped; by
11
+ # default that is `bin/rails runner` scripts.
10
12
  # - Errors are fingerprinted by exception class + the top application
11
13
  # backtrace frame (line numbers stripped, so deploys that shift code
12
14
  # around keep the same fingerprint).
@@ -23,6 +25,7 @@ module BugReportsClient
23
25
  def report(error, handled:, severity: nil, context: {}, source: nil)
24
26
  return if handled
25
27
  return unless BugReportsClient.config.error_reporting_enabled
28
+ return if BugReportsClient.config.ignored_error_sources.include?(source)
26
29
  return if ignored?(error)
27
30
 
28
31
  fingerprint = self.class.fingerprint_for(error)
@@ -1,3 +1,3 @@
1
1
  module BugReportsClient
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bug_reports_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - PSA Squash Tour
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-16 00:00:00.000000000 Z
11
+ date: 2026-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails