airbrake-ruby 3.2.1 → 3.2.2
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 +4 -4
- data/lib/airbrake-ruby.rb +7 -2
- data/lib/airbrake-ruby/notice_notifier.rb +11 -1
- data/lib/airbrake-ruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82ca32e950f53b9648c8e3273d761b3867d3aa73
|
4
|
+
data.tar.gz: 12a0549d740f4513a092cb03a37e27de097ec729
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97ce5869c74affd78fcb5d1a9054a3a80bd4c96ff54ed34dfd0b9bdccdae673ed904e938f6888de260a8767c0b78ac013380594dbf7b550040dace22b77d4a06
|
7
|
+
data.tar.gz: bb1a678a171c0d5d18b85d382cb49c394c9112ce0d0473795d5161dab1650c058ae8c61e7224be4ac3207323095815922742522a097b4ca5aa189eb18636a9c9
|
data/lib/airbrake-ruby.rb
CHANGED
@@ -239,8 +239,13 @@ module Airbrake
|
|
239
239
|
|
240
240
|
raise Airbrake::Error, config.validation_error_message unless config.valid?
|
241
241
|
|
242
|
-
|
243
|
-
|
242
|
+
# TODO: Kludge to avoid
|
243
|
+
# https://github.com/airbrake/airbrake-ruby/issues/406
|
244
|
+
# Stop passing perf_notifier to NoticeNotifier as soon as possible.
|
245
|
+
perf_notifier = PerformanceNotifier.new(config)
|
246
|
+
@performance_notifiers[notifier_name] = perf_notifier
|
247
|
+
@notice_notifiers[notifier_name] = NoticeNotifier.new(config, perf_notifier)
|
248
|
+
|
244
249
|
@deploy_notifiers[notifier_name] = DeployNotifier.new(config)
|
245
250
|
end
|
246
251
|
|
@@ -34,7 +34,7 @@ module Airbrake
|
|
34
34
|
# notice_notifier = Airbrake::NoticeNotifier.new(config)
|
35
35
|
#
|
36
36
|
# @param [Airbrake::Config] config
|
37
|
-
def initialize(config)
|
37
|
+
def initialize(config, perf_notifier = nil)
|
38
38
|
@config =
|
39
39
|
if config.is_a?(Config)
|
40
40
|
config
|
@@ -52,6 +52,7 @@ module Airbrake
|
|
52
52
|
@filter_chain = FilterChain.new
|
53
53
|
@async_sender = AsyncSender.new(@config)
|
54
54
|
@sync_sender = SyncSender.new(@config)
|
55
|
+
@perf_notifier = perf_notifier
|
55
56
|
|
56
57
|
add_default_filters
|
57
58
|
end
|
@@ -66,6 +67,15 @@ module Airbrake
|
|
66
67
|
send_notice(exception, params, @sync_sender, &block).value
|
67
68
|
end
|
68
69
|
|
70
|
+
# @deprecated Update the airbrake gem to v8.1.0 or higher
|
71
|
+
def notify_request(request_info, promise = Promise.new)
|
72
|
+
@config.logger.info(
|
73
|
+
"#{LOG_LABEL} #{self.class}##{__method__} is deprecated. Update " \
|
74
|
+
'the airbrake gem to v8.1.0 or higher'
|
75
|
+
)
|
76
|
+
@perf_notifier.notify(Request.new(request_info), promise)
|
77
|
+
end
|
78
|
+
|
69
79
|
# @macro see_public_api_method
|
70
80
|
def add_filter(filter = nil, &block)
|
71
81
|
@filter_chain.add_filter(block_given? ? block : filter)
|