airbrake-ruby 4.5.0-java → 4.5.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/airbrake-ruby/performance_notifier.rb +1 -1
- data/lib/airbrake-ruby/stat.rb +11 -0
- data/lib/airbrake-ruby/version.rb +1 -1
- data/spec/stat_spec.rb +14 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae44df864962487a4dbe1a4df872256599657094
|
4
|
+
data.tar.gz: c79758680cc22faea98b5d93877a7c46a26949e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db8be8324e647e5bfc46741fced926b455407abbc5ddbe9da353e6adb95d4226ebe0c0c29b12c3f4c214d8ea2de260b014e647435a9f1fff6db0cf12f444efe8
|
7
|
+
data.tar.gz: 859ab7e7f71ce69259481901f289746ac1cb2148a2690c8134db1cab087935d2e2944d2f821c875b7aeed41cfb0226fcb73399ffe247da373d23a7e5ec3993bd
|
@@ -82,7 +82,7 @@ module Airbrake
|
|
82
82
|
signature = "#{self.class.name}##{__method__}"
|
83
83
|
raise "#{signature}: payload (#{payload}) cannot be empty. Race?" if payload.none?
|
84
84
|
|
85
|
-
logger.debug
|
85
|
+
logger.debug { "#{LOG_LABEL} #{signature}: #{payload}" }
|
86
86
|
|
87
87
|
with_grouped_payload(payload) do |resource_hash, destination|
|
88
88
|
url = URI.join(
|
data/lib/airbrake-ruby/stat.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'base64'
|
2
2
|
|
3
|
+
# rubocop:disable Metrics/BlockLength
|
3
4
|
module Airbrake
|
4
5
|
# Stat is a data structure that allows accumulating performance data (route
|
5
6
|
# performance, SQL query performance and such). It's powered by TDigests.
|
@@ -58,5 +59,15 @@ module Airbrake
|
|
58
59
|
|
59
60
|
tdigest.push(ms)
|
60
61
|
end
|
62
|
+
|
63
|
+
# We define custom inspect so that we weed out uninformative TDigest, which
|
64
|
+
# is also very slow to dump when we log Airbrake::Stat.
|
65
|
+
#
|
66
|
+
# @return [String]
|
67
|
+
def inspect
|
68
|
+
"#<struct Airbrake::Stat count=#{count}, sum=#{sum}, sumsq=#{sumsq}>"
|
69
|
+
end
|
70
|
+
alias_method :pretty_print, :inspect
|
61
71
|
end
|
62
72
|
end
|
73
|
+
# rubocop:enable Metrics/BlockLength
|
data/spec/stat_spec.rb
CHANGED
@@ -30,4 +30,18 @@ RSpec.describe Airbrake::Stat do
|
|
30
30
|
expect(subject.tdigest.size).to eq(1)
|
31
31
|
end
|
32
32
|
end
|
33
|
+
|
34
|
+
describe "#inspect" do
|
35
|
+
it "provides custom inspect output" do
|
36
|
+
expect(subject.inspect).to eq(
|
37
|
+
'#<struct Airbrake::Stat count=0, sum=0.0, sumsq=0.0>'
|
38
|
+
)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe "#pretty_print" do
|
43
|
+
it "is an alias of #inspect" do
|
44
|
+
expect(subject.method(:pretty_print)).to eql(subject.method(:inspect))
|
45
|
+
end
|
46
|
+
end
|
33
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.5.
|
4
|
+
version: 4.5.1
|
5
5
|
platform: java
|
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-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbtree-jruby
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
157
|
rubyforge_project:
|
158
|
-
rubygems_version: 2.6.
|
158
|
+
rubygems_version: 2.6.14.4
|
159
159
|
signing_key:
|
160
160
|
specification_version: 4
|
161
161
|
summary: Ruby notifier for https://airbrake.io
|