freddy 2.2.3 → 2.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/freddy/producers/reply_producer.rb +1 -1
- data/lib/freddy/producers/send_and_forget_producer.rb +1 -1
- data/lib/freddy/producers/send_and_wait_response_producer.rb +1 -1
- data/lib/freddy/tracing.rb +3 -2
- data/lib/freddy/version.rb +1 -1
- data/spec/integration/tracing_spec.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d6513e834c71f74caf3c8417644369fddf4087d226d8160c0d72f63d6551db0
|
4
|
+
data.tar.gz: e4cd3e5016030ec1b5727d9764593d7af91c389b528458a2befeecc502a6600a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/lib/freddy/tracing.rb
CHANGED
@@ -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
|
data/lib/freddy/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2021-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|