govuk_app_config 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20aaa15a96de29af59424ad9889d8020af8964c557089dc11c429ef38d67513c
|
4
|
+
data.tar.gz: 6e20e3346f6bf65927b4a4835f1c45f9da92c3daf2f261c6f9fc433f9620b8be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47386015166932a21469cb73fd7be967293a61b244b72f1f1bc5fc8065131a2ffd805441a2813d3bbc182754624b78ee866cb2f3baa6ebcc954b3041076c8477
|
7
|
+
data.tar.gz: 77833ef66a28baf07a35cdb033f2fb44a2d259392b53b61cc5cf8e4e6df82ca15bdeeab96aecc309506f6b0ed4187be4be3dde3b00aed717056d5230e3a69387
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# 3.1.1
|
2
|
+
|
3
|
+
- Fix the new before_send behaviour & tests, and add documentation ([#197](https://github.com/alphagov/govuk_app_config/pull/197))
|
4
|
+
|
1
5
|
# 3.1.0
|
2
6
|
|
3
7
|
- Remove support for `should_capture` callbacks in favour of `before_send` ([#196](https://github.com/alphagov/govuk_app_config/pull/196))
|
data/README.md
CHANGED
@@ -112,12 +112,12 @@ end
|
|
112
112
|
Finally, you can pass your own callback to evaluate whether or not to capture the exception.
|
113
113
|
Note that if an exception is on the `excluded_exceptions` list, or on the `data_sync_excluded_exceptions`
|
114
114
|
and occurs at the time of a data sync, then it will be excluded even if the custom
|
115
|
-
`
|
115
|
+
`before_send` callback doesn't return `nil`.
|
116
116
|
|
117
117
|
```ruby
|
118
118
|
GovukError.configure do |config|
|
119
|
-
config.
|
120
|
-
error_or_event == "do capture"
|
119
|
+
config.before_send = lambda do |error_or_event|
|
120
|
+
error_or_event == "do capture" ? error_or_event : nil
|
121
121
|
end
|
122
122
|
end
|
123
123
|
```
|
@@ -17,11 +17,11 @@ module GovukError
|
|
17
17
|
ignore_excluded_exceptions_in_data_sync,
|
18
18
|
increment_govuk_statsd_counters,
|
19
19
|
]
|
20
|
-
super.before_send = run_before_send_callbacks
|
21
20
|
end
|
22
21
|
|
23
22
|
def before_send=(closure)
|
24
23
|
@before_send_callbacks.insert(-2, closure)
|
24
|
+
super(run_before_send_callbacks)
|
25
25
|
end
|
26
26
|
|
27
27
|
protected
|
@@ -39,7 +39,7 @@ module GovukError
|
|
39
39
|
rescue NameError
|
40
40
|
# the exception type represented by the exception_to_ignore string
|
41
41
|
# doesn't even exist in this environment, so won't be found in the chain
|
42
|
-
|
42
|
+
false
|
43
43
|
end
|
44
44
|
|
45
45
|
error_or_event unless data_sync.in_progress? && data_sync_ignored_error
|
@@ -58,6 +58,10 @@ GovukError.configure do |config|
|
|
58
58
|
"GdsApi::ContentStore::ItemNotFound",
|
59
59
|
]
|
60
60
|
|
61
|
+
config.before_send = lambda { |error_or_event, _hint|
|
62
|
+
error_or_event
|
63
|
+
}
|
64
|
+
|
61
65
|
config.transport_failure_callback = proc {
|
62
66
|
GovukStatsd.increment("error_reports_failed")
|
63
67
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_app_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstasher
|