vx-instrumentation 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vx/instrumentation/version.rb +1 -1
- data/lib/vx/instrumentation.rb +11 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4183a8c512c07a67e2149fd8779ec8f4608d663e
|
4
|
+
data.tar.gz: ec4faa9f0a535a750cbde18a608b9ea4ecd5f8db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c30190b334370bd8bebd9a8305814f47894a769843854993687c7134173f06d60d4649620343efc1428e40c83ad352f702090ab20826044d594405b902dd5549
|
7
|
+
data.tar.gz: d62a7b3f3a009eea09770ef830fb54d7d13d313b4e8a4ad591a1a23955b9707edb90cefacba3352137bd03f4e136175a7891c20b91d5aa666a613749faccdbf5
|
data/lib/vx/instrumentation.rb
CHANGED
@@ -47,17 +47,16 @@ module Vx
|
|
47
47
|
tags.uniq!
|
48
48
|
|
49
49
|
payload = {
|
50
|
-
"@event"
|
51
|
-
"@
|
52
|
-
"@
|
53
|
-
"@
|
54
|
-
|
55
|
-
|
56
|
-
exception:
|
57
|
-
message:
|
58
|
-
backtrace:
|
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
|
-
|
69
|
-
|
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,
|