airbrake 9.2.0 → 9.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/airbrake/rack/instrumentable.rb +2 -2
- data/lib/airbrake/version.rb +1 -1
- data/spec/unit/rack/instrumentable_spec.rb +16 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 10b37a9a2800aa301044ab10d4886a1f3c505287
|
4
|
+
data.tar.gz: e930fa9ea09846007c8890e173bb948792953f6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04d6316c3f2332a44829c44892f913a1c6c09d0779fed70b2872d414e711a1a04cb7e62acc51ee9c1b037f5fe8f7f93d7debf2e0dbfd3552f62ec67dccabfcee
|
7
|
+
data.tar.gz: d00ea1b0d2137bce44df884aa0973bd44a9a0185e0a0e6e305c715c4d24f3f6fe4d4351d37ca38d3cc260af620a93ea2516fd303fb55d137f4fbc7e6b09801ee
|
@@ -14,11 +14,11 @@ module Airbrake
|
|
14
14
|
# @api public
|
15
15
|
# @since v9.2.0
|
16
16
|
module Instrumentable
|
17
|
-
def airbrake_capture_timing(method_name)
|
17
|
+
def airbrake_capture_timing(method_name, label: method_name.to_s)
|
18
18
|
alias_method "#{method_name}_without_airbrake", method_name
|
19
19
|
|
20
20
|
define_method(method_name) do |*args|
|
21
|
-
Airbrake::Rack.capture_timing(
|
21
|
+
Airbrake::Rack.capture_timing(label) do
|
22
22
|
__send__("#{method_name}_without_airbrake", *args)
|
23
23
|
end
|
24
24
|
end
|
data/lib/airbrake/version.rb
CHANGED
@@ -84,6 +84,22 @@ RSpec.describe Airbrake::Rack::Instrumentable do
|
|
84
84
|
'method_with_arg' => be > 0
|
85
85
|
)
|
86
86
|
end
|
87
|
+
|
88
|
+
context "and when a custom label was provided" do
|
89
|
+
let(:klass) do
|
90
|
+
Class.new do
|
91
|
+
extend Airbrake::Rack::Instrumentable
|
92
|
+
|
93
|
+
def method; end
|
94
|
+
airbrake_capture_timing :method, label: 'custom label'
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
it "attaches timing under the provided label" do
|
99
|
+
klass.new.method
|
100
|
+
expect(groups).to match('custom label' => be > 0)
|
101
|
+
end
|
102
|
+
end
|
87
103
|
end
|
88
104
|
end
|
89
105
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.2.
|
4
|
+
version: 9.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airbrake Technologies, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: airbrake-ruby
|
@@ -430,7 +430,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
430
430
|
- !ruby/object:Gem::Version
|
431
431
|
version: '0'
|
432
432
|
requirements: []
|
433
|
-
|
433
|
+
rubyforge_project:
|
434
|
+
rubygems_version: 2.6.13
|
434
435
|
signing_key:
|
435
436
|
specification_version: 4
|
436
437
|
summary: Airbrake is an online tool that provides robust exception tracking in any
|