request-tracer 0.6.3 → 0.6.4

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGUzZDkyNTRiMGFjNTkzZGVhMzE3ZmRmMWFjNGRmZjM4NmQyNDBhZg==
4
+ ZTk3ZDIyZTNmZWEwMmQ3NTQ4MDRjZDg2NGE0NGI4MGM4NmQxZjI2Zg==
5
5
  data.tar.gz: !binary |-
6
- MzgyYTEzMmM0OTYyYTk1NDViYzc2NzExYWUyYTBlYmYwYWE5ZDM4NA==
6
+ OTlmYWQwNmUzYTJjNGI1ZDRhYzJkZDcyYWNmNjU2YmVmZDczODA5Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZWY4MDVjMjRlZTI2MTMxMTYzOTA5ZTdhYTM1ZTIzZmZlYzBiMTlhNWYyMzMz
10
- YTc0Zjg2MzFhZjQwNjE1MzYyYjM3MTc2M2I2Mjg3YjRjOTkzN2Y2MWQ0MmZl
11
- NjMxZDY1OGQ1MzcyMTZhNmYzNjNhMzcxOThiYmRhY2QwNDgwNDA=
9
+ MWNhNzdiMWYwM2ZhYTBlNTA0Mzc0ZjM0YzA5YzcxODA2ZmFjNDhiMTNiMGU0
10
+ Nzg5YmNiZjY5ZmU0M2ZhZWE3NDNhNzBkOThkMjU0MWRkYWQyZjMwZGU2NTNm
11
+ YmU4NjZjOWU0YjQ1ODcxYmU0Y2MyNDU3NzZiYTYyNjk1MjllNDA=
12
12
  data.tar.gz: !binary |-
13
- ZDZkZmI5NTcxNjNiYzI2ZjcwY2I2Y2VlZGE1ZjI2YTZhNDJmNTkxM2UxZTU4
14
- MmZlZDAxYzRlNDMyNmQ5ZTc2NzAzMDY4ODcxNDE3MDVhMmQxZWFkYjRjZTBk
15
- MGRjNjhhNjYxNmEyNjgwMDEzYjczZjIyNWFhZTliMzQ4NDQ2OTU=
13
+ ZjljYTY0OTY5YWM1ZTYzN2QzNmZjMjYxMDJjZGNmYTI4NDBhNjVkMmE2ZWI4
14
+ MTZkZjA0Zjc2NDM1ZWVmMGE0ZDYxMDBkM2M4ZjIyMjViZmM4ZDcwZjQzZTcx
15
+ Y2JhMjZkOWRlYzYyNjNkYjU0MzIzNDczOThlNmI0NTRhY2Q4NzQ=
@@ -1,3 +1,3 @@
1
1
  module RequestTracer
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
@@ -1,3 +1,5 @@
1
+ require_relative 'request_tracer/trace'
2
+
1
3
  module RequestTracer
2
4
  B3_REQUIRED_FIELDS = %w(trace_id parent_span_id span_id)
3
5
  B3_REQUIRED_FIELDS_FROM_SHORT_NAMES = B3_REQUIRED_FIELDS.map {|f| [f.gsub("_", ""), f] }.to_h
@@ -14,4 +16,8 @@ module RequestTracer
14
16
  integration_module.activate
15
17
  end
16
18
  end
19
+
20
+ def self.latest_trace_hash(*args)
21
+ Trace.latest.to_h
22
+ end
17
23
  end
@@ -22,6 +22,6 @@ class TestApp
22
22
  end
23
23
 
24
24
  def store_current_trace_info
25
- $stderr.puts "%%% #{(Time.now.to_f * 1000).to_i} #{RequestTracer::Trace.latest.to_json}"
25
+ $stderr.puts "%%% #{(Time.now.to_f * 1000).to_i} #{RequestTracer.latest_trace_hash.to_json}"
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: request-tracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Mauch