freddy 2.2.3 → 2.2.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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6be4b4b6d953f837c24d9c55f990e4e75872c13e6c11007d8f61ed335681faa2
4
- data.tar.gz: 863042876b2ed673001cd53f296567ad91420864b96cbed5ed02fb6fd7820b22
3
+ metadata.gz: 3d6513e834c71f74caf3c8417644369fddf4087d226d8160c0d72f63d6551db0
4
+ data.tar.gz: e4cd3e5016030ec1b5727d9764593d7af91c389b528458a2befeecc502a6600a
5
5
  SHA512:
6
- metadata.gz: 002f901659f670dc1561db4ddc97d10e5a9d9b689369897628f1844fa0ffc65f759493fe96bc7541f6b7c204427bb584133fa3b306e19752b133a42b1b077a52
7
- data.tar.gz: d2383b11b79800aabf6a0f0fe52a51f900a12c5ebcf17e64be8ca5e31243bd183dadb662e17c14416b0ee3e7d5ad26cbe00e067f7c39b709133a019082358fe8
6
+ metadata.gz: 81581b4a9c227aebcfb7f96db79367e4d233502bc0586599500530bb339826371dad203f928e45b2e512f74469c87c8f6f591ca9602d0a14e2e6f047868dae61
7
+ data.tar.gz: '090195d2a78659ac91cfef94099dca0bdf382b52590b9298680cd17ed5a04586ee87f5ace05e2fb2a465dc8cf87a07c3504445d78f3d25d6839c34208b291a10'
@@ -22,7 +22,7 @@ class Freddy
22
22
  routing_key: routing_key,
23
23
  content_type: CONTENT_TYPE
24
24
  )
25
- Tracing.inject_tracing_information_to_properties!(properties)
25
+ Tracing.inject_tracing_information_to_properties!(properties, span)
26
26
 
27
27
  @exchange.publish Payload.dump(payload), properties
28
28
  ensure
@@ -18,7 +18,7 @@ class Freddy
18
18
  routing_key: routing_key,
19
19
  content_type: CONTENT_TYPE
20
20
  )
21
- Tracing.inject_tracing_information_to_properties!(properties)
21
+ Tracing.inject_tracing_information_to_properties!(properties, span)
22
22
 
23
23
  json_payload = Freddy::Encoding.compress(
24
24
  Payload.dump(payload),
@@ -49,7 +49,7 @@ class Freddy
49
49
  correlation_id: correlation_id, reply_to: @response_queue.name,
50
50
  mandatory: true, type: 'request'
51
51
  )
52
- Tracing.inject_tracing_information_to_properties!(properties)
52
+ Tracing.inject_tracing_information_to_properties!(properties, span)
53
53
 
54
54
  # Connection adapters handle thread safety for #publish themselves. No
55
55
  # need to lock this.
@@ -39,9 +39,10 @@ class Freddy
39
39
  end
40
40
  end
41
41
 
42
- def self.inject_tracing_information_to_properties!(properties)
42
+ def self.inject_tracing_information_to_properties!(properties, span)
43
+ context = OpenTelemetry::Trace.context_with_span(span)
43
44
  properties[:headers] ||= {}
44
- OpenTelemetry.propagation.inject(properties[:headers])
45
+ OpenTelemetry.propagation.inject(properties[:headers], context: context)
45
46
  end
46
47
  end
47
48
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Freddy
4
- VERSION = '2.2.3'
4
+ VERSION = '2.2.4'
5
5
  end
@@ -147,10 +147,13 @@ describe 'Tracing' do
147
147
  /freddy-topic\.\w+ process/
148
148
  ])
149
149
 
150
+ send_span = exporter.finished_spans.find { |span| span.name =~ /\.\w+ send/ }
151
+
150
152
  expect(@deliver_span.fetch(:trace_id)).not_to eq(initiator_span.fetch(:trace_id))
151
153
 
152
154
  link = @deliver_span.fetch(:links)[0]
153
155
  expect(link.span_context.trace_id).to eq(initiator_span.fetch(:trace_id))
156
+ expect(link.span_context.span_id).to eq(send_span.span_id)
154
157
  end
155
158
  end
156
159
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glia TechMovers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-11 00:00:00.000000000 Z
11
+ date: 2021-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler