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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 8ec9218ace9460703a1d2865973e8dd6c2775f7d118996afc2a624760e87dd38
4
- data.tar.gz: ab13902a530d5deed54b0af6f959129a838a1dc4298fd71237cd762acad63561
2
+ SHA1:
3
+ metadata.gz: 10b37a9a2800aa301044ab10d4886a1f3c505287
4
+ data.tar.gz: e930fa9ea09846007c8890e173bb948792953f6b
5
5
  SHA512:
6
- metadata.gz: 684bb118906bf8214fc20bddbae50091dd9ed4c90ff9c1c3487cdf5405389d7eb7e96e10e8673ff13ca97b5d8b8d4a624e3305beb2e9cdf3a15d092bdeae24ec
7
- data.tar.gz: 3c98f5854b2efb7e3fab3a3eecc25e79dafe5edc7e223a72ff98613335baac0490984b8670f504ed0a6339b3d3fec1beb729b6611fe4d20a51abe7675f691b9a
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(method_name.to_s) do
21
+ Airbrake::Rack.capture_timing(label) do
22
22
  __send__("#{method_name}_without_airbrake", *args)
23
23
  end
24
24
  end
@@ -1,5 +1,5 @@
1
1
  # We use Semantic Versioning v2.0.0
2
2
  # More information: http://semver.org/
3
3
  module Airbrake
4
- AIRBRAKE_VERSION = '9.2.0'.freeze
4
+ AIRBRAKE_VERSION = '9.2.1'.freeze
5
5
  end
@@ -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.0
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-04-30 00:00:00.000000000 Z
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
- rubygems_version: 3.0.1
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