imprint 1.4.3.pre → 1.4.3.pre2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/imprint/tracer.rb +2 -2
- data/lib/imprint/version.rb +1 -1
- data/test/unit/tracer_test.rb +2 -2
- metadata +2 -2
data/lib/imprint/tracer.rb
CHANGED
@@ -9,7 +9,7 @@ module Imprint
|
|
9
9
|
TRACE_CHARS = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten
|
10
10
|
|
11
11
|
def self.set_trace_id(id, rack_env = {})
|
12
|
-
Thread.current[TRACER_TIMESTAMP] ||= Time.now.
|
12
|
+
Thread.current[TRACER_TIMESTAMP] ||= Time.now.strftime("%Y-%m-%dT%H:%M:%S.%6N")
|
13
13
|
Thread.current[TRACER_KEY] = id
|
14
14
|
# setting to the rack_env, gives error tracking support in some systems
|
15
15
|
rack_env[TRACER_KEY] = id
|
@@ -24,7 +24,7 @@ module Imprint
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def self.get_trace_timestamp
|
27
|
-
Thread.current[TRACER_TIMESTAMP] ||= Time.now.
|
27
|
+
Thread.current[TRACER_TIMESTAMP] ||= Time.now.strftime("%Y-%m-%dT%H:%M:%S.%6N")
|
28
28
|
end
|
29
29
|
|
30
30
|
def self.insert_trace_id_in_message(message)
|
data/lib/imprint/version.rb
CHANGED
data/test/unit/tracer_test.rb
CHANGED
@@ -15,7 +15,7 @@ class TracerTest < Minitest::Test
|
|
15
15
|
Imprint::Tracer.set_trace_id(fake_trace, fake_rack_env)
|
16
16
|
# timecop has a bug with millisec time on osx
|
17
17
|
# this makes the check ignore millisec
|
18
|
-
assert !!Imprint::Tracer.get_trace_timestamp.to_s.match(/#{test_time.
|
18
|
+
assert !!Imprint::Tracer.get_trace_timestamp.to_s.match(/#{test_time.strftime("%Y-%m-%dT%H:%M:%S")}/)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -32,7 +32,7 @@ class TracerTest < Minitest::Test
|
|
32
32
|
test_time = Time.now
|
33
33
|
# timecop has a bug with millisec time on osx
|
34
34
|
# this makes the check ignore millisec
|
35
|
-
assert !!Imprint::Tracer.get_trace_timestamp.to_s.match(/#{test_time.
|
35
|
+
assert !!Imprint::Tracer.get_trace_timestamp.to_s.match(/#{test_time.strftime("%Y-%m-%dT%H:%M:%S")}/)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imprint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.3.
|
4
|
+
version: 1.4.3.pre2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -148,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
segments:
|
150
150
|
- 0
|
151
|
-
hash:
|
151
|
+
hash: 2015645248561803847
|
152
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
153
|
none: false
|
154
154
|
requirements:
|