vx-instrumentation 0.0.1 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e2d666dc400fcb14d81f99233e4bf4e544aa594
4
- data.tar.gz: ec357619cff76c059cd349c862db172ae4f9ebe5
3
+ metadata.gz: 4183a8c512c07a67e2149fd8779ec8f4608d663e
4
+ data.tar.gz: ec4faa9f0a535a750cbde18a608b9ea4ecd5f8db
5
5
  SHA512:
6
- metadata.gz: 53d7910af3fb3949d6c9df4ebd96b529fe89ed9ee0ee82a62138ff9159875b4d3f5f94579ebf05a79c8024333a4ed247c818b5828bff16d669e4d4fe699e6490
7
- data.tar.gz: 9b447bed92a4a082d2372d856ecc84908fd0b0a16af577751441939e48ccd1ff42cfc43b39ca4b6c56df523d6cd5dc21ced96e3bd19f1c610029af5610286c0e
6
+ metadata.gz: c30190b334370bd8bebd9a8305814f47894a769843854993687c7134173f06d60d4649620343efc1428e40c83ad352f702090ab20826044d594405b902dd5549
7
+ data.tar.gz: d62a7b3f3a009eea09770ef830fb54d7d13d313b4e8a4ad591a1a23955b9707edb90cefacba3352137bd03f4e136175a7891c20b91d5aa666a613749faccdbf5
@@ -1,5 +1,5 @@
1
1
  module Vx
2
2
  module Instrumentation
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -47,17 +47,16 @@ module Vx
47
47
  tags.uniq!
48
48
 
49
49
  payload = {
50
- "@event" => event,
51
- "@process_id" => Process.pid,
52
- "@thread_id" => Thread.current.object_id,
53
- "@timestamp" => Time.now.strftime(DATE_FORMAT),
54
- "@tags" => tags,
55
- "@fields" => env,
56
- exception: ex.class.to_s,
57
- message: ex.message.to_s,
58
- backtrace: (ex.backtrace || []).map(&:to_s).join("\n"),
50
+ "@event" => event,
51
+ "@timestamp" => Time.now.strftime(DATE_FORMAT),
52
+ "@tags" => tags,
53
+ "@fields" => env,
54
+ process_id: Process.pid,
55
+ thread_id: Thread.current.object_id,
56
+ exception: ex.class.to_s,
57
+ message: ex.message.to_s,
58
+ backtrace: (ex.backtrace || []).map(&:to_s).join("\n"),
59
59
  }
60
- puts payload.inspect
61
60
  Vx::Instrumentation::Logger.logger.error(payload)
62
61
  end
63
62
 
@@ -65,8 +64,8 @@ module Vx
65
64
  Vx::Instrumentation::Logger.logger.log(
66
65
  ::Logger::INFO,
67
66
  "@event" => name,
68
- "@process_id" => Process.pid,
69
- "@thread_id" => Thread.current.object_id,
67
+ process_id: Process.pid,
68
+ thread_id: Thread.current.object_id,
70
69
  "@timestamp" => started.strftime(DATE_FORMAT),
71
70
  "@duration" => (finished - started).to_f,
72
71
  "@fields" => payload,
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.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Galinsky