lightstep 0.10.6 → 0.10.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/circle.yml +0 -4
- data/lib/lightstep/span.rb +8 -10
- data/lib/lightstep/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcb8f302e447c2766070f49aaf21b4ed0bd03070
|
4
|
+
data.tar.gz: ff1e95cbe7493f74a65ade9861524bf83d45d597
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d00ffdbc9e347ab442f86eb5677848e96e65386970a46460461ad916bfb4230a5396d7bcefb7f95d0233e8c01f6d71832ebcbc241e4f9108dcc3cda5023ffc90
|
7
|
+
data.tar.gz: 8e3bc0f2c7fc3020dd2de3d167b5baf5972578f2242eb9f4a30816617f5b0ed27c8780c59d5306c583621ae1e53fc464547dc5a4f0a0f455ca879ce6cc02c17b
|
data/circle.yml
CHANGED
data/lib/lightstep/span.rb
CHANGED
@@ -92,18 +92,16 @@ module LightStep
|
|
92
92
|
def log(event: nil, timestamp: Time.now, **fields)
|
93
93
|
return unless tracer.enabled?
|
94
94
|
|
95
|
+
fields = {} if fields.nil?
|
96
|
+
unless event.nil?
|
97
|
+
fields[:event] = event.to_s
|
98
|
+
end
|
95
99
|
record = {
|
96
|
-
|
97
|
-
|
100
|
+
timestamp_micros: LightStep.micros(timestamp),
|
101
|
+
fields: fields.to_a.map {|key, value|
|
102
|
+
{Key: key.to_s, Value: value.to_s}
|
103
|
+
},
|
98
104
|
}
|
99
|
-
record[:stable_name] = event.to_s if !event.nil?
|
100
|
-
|
101
|
-
begin
|
102
|
-
record[:payload_json] = JSON.generate(fields, max_nesting: 8)
|
103
|
-
rescue
|
104
|
-
# TODO: failure to encode a payload as JSON should be recorded in the
|
105
|
-
# internal library logs, being careful not to flood them.
|
106
|
-
end
|
107
105
|
|
108
106
|
log_records.push(record)
|
109
107
|
if log_records.size > @max_log_records
|
data/lib/lightstep/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lightstep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bcronin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01
|
11
|
+
date: 2017-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|