vx-instrumentation 0.1.0 → 0.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
  SHA1:
3
- metadata.gz: 40c7266e5a8ccd0a4ebfa9ac92855c007a866e60
4
- data.tar.gz: cc745d13d1d3290c3fcdb88b0a85be2f5c6662f7
3
+ metadata.gz: bb50fba2c5ce5b6781180d226e50c9492cd9dc29
4
+ data.tar.gz: bbb9c4616bff1b15b656c14b7196a852107c74c4
5
5
  SHA512:
6
- metadata.gz: a039d63e7b290a1cde70cc63b47ddb46c4d6833926786d331893b1e0b752cafb2f2466c68ff16aa30f035e8b57a624026db0af55b53d6c5cb02ba7a46abdbbc0
7
- data.tar.gz: 32720993fd5304a49b0387e35474886d2f513367d873d7b2eeb299dfd26d9123157f40564d0e6860bd7fbd6d1aa41412241cf0f8e9f9f957ded51aea72d62ab4
6
+ metadata.gz: 64f695cac110a4e115f9bcf2f35befe17a9f56248e776b1d93dd7c094e3df71dc3c1565dca4bacceca18a0bae9bbfd7384598dbbf5b1a948a48fe50d13ade9ae
7
+ data.tar.gz: 386871fe6f9d668edf0e2075f761424fa3bea67fada6c199b8f8393bdfb642a45a7c17dbdca936d7c96f2bd186b40a126c1fab1dc8ee7d50ad5440f70fb95596
@@ -3,11 +3,13 @@ require 'thread'
3
3
  require File.expand_path("../instrumentation/version", __FILE__)
4
4
  require File.expand_path("../instrumentation/logger", __FILE__)
5
5
  require File.expand_path("../instrumentation/airbrake", __FILE__)
6
+ require File.expand_path("../instrumentation/stderr", __FILE__)
6
7
 
7
8
  module Vx
8
9
  module Instrumentation
9
10
 
10
11
  extend Airbrake
12
+ extend Stderr
11
13
 
12
14
  DATE_FORMAT = '%Y-%m-%dT%H:%M:%S.%N%z'
13
15
  THREAD_KEY = 'vx_instrumentation_keys'
@@ -50,6 +52,9 @@ module Vx
50
52
  message: ex.message.to_s,
51
53
  backtrace: (ex.backtrace || []).map(&:to_s).join("\n"),
52
54
  }
55
+
56
+ notify_stderr(ex)
57
+
53
58
  Vx::Instrumentation::Logger.logger.error(payload)
54
59
  notify_airbrake(ex, env)
55
60
  end
@@ -0,0 +1,13 @@
1
+ module Vx
2
+ module Instrumentation
3
+ module Stderr
4
+
5
+ def notify_stderr(e)
6
+ backtrace = e.backtrace || []
7
+ puts "#{backtrace.first}: #{e.message} (#{e.class})", backtrace.drop(1).map{|s| "\t#{s}"}
8
+ end
9
+
10
+ end
11
+
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  module Vx
2
2
  module Instrumentation
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vx-instrumentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Galinsky
@@ -83,6 +83,7 @@ files:
83
83
  - lib/vx/instrumentation.rb
84
84
  - lib/vx/instrumentation/airbrake.rb
85
85
  - lib/vx/instrumentation/logger.rb
86
+ - lib/vx/instrumentation/stderr.rb
86
87
  - lib/vx/instrumentation/version.rb
87
88
  - spec/lib/instrumentation_spec.rb
88
89
  - spec/lib/logger_spec.rb