|
188 | 188 | _(process_span.links[0].span_context.span_id).must_equal(publish_span.span_id) |
189 | 189 | end |
190 | 190 |
|
191 | | - it 'propagates baggage' do |
192 | | - ctx = OpenTelemetry::Baggage.set_value('testing_baggage', 'it_worked') |
193 | | - OpenTelemetry::Context.with_current(ctx) do |
194 | | - BaggageJob.perform_later |
195 | | - end |
196 | | - |
197 | | - _(publish_span.trace_id).wont_equal(process_span.trace_id) |
198 | | - |
199 | | - _(process_span.total_recorded_links).must_equal(1) |
200 | | - _(process_span.links[0].span_context.trace_id).must_equal(publish_span.trace_id) |
201 | | - _(process_span.links[0].span_context.span_id).must_equal(publish_span.span_id) |
202 | | - |
203 | | - _(process_span.attributes['success']).must_equal(true) |
204 | | - end |
205 | | - |
206 | 191 | describe 'with an async queue adapter' do |
207 | 192 | before do |
208 | 193 | begin |
|
225 | 210 | _(process_span.links[0].span_context.trace_id).must_equal(publish_span.trace_id) |
226 | 211 | _(process_span.links[0].span_context.span_id).must_equal(publish_span.span_id) |
227 | 212 | end |
| 213 | + |
| 214 | + it 'propagates baggage' do |
| 215 | + ctx = OpenTelemetry::Baggage.set_value('testing_baggage', 'it_worked') |
| 216 | + OpenTelemetry::Context.with_current(ctx) do |
| 217 | + BaggageJob.perform_later |
| 218 | + end |
| 219 | + perform_enqueued_jobs |
| 220 | + |
| 221 | + _(publish_span.trace_id).wont_equal(process_span.trace_id) |
| 222 | + |
| 223 | + _(process_span.total_recorded_links).must_equal(1) |
| 224 | + _(process_span.links[0].span_context.trace_id).must_equal(publish_span.trace_id) |
| 225 | + _(process_span.links[0].span_context.span_id).must_equal(publish_span.span_id) |
| 226 | + _(process_span.attributes['success']).must_equal(true) |
| 227 | + end |
228 | 228 | end |
229 | 229 | end |
230 | 230 |
|
|
251 | 251 | _(process_span.parent_span_id).must_equal(publish_span.span_id) |
252 | 252 | end |
253 | 253 |
|
254 | | - it 'propagates baggage' do |
255 | | - ctx = OpenTelemetry::Baggage.set_value('testing_baggage', 'it_worked') |
256 | | - OpenTelemetry::Context.with_current(ctx) do |
257 | | - BaggageJob.perform_later |
258 | | - end |
259 | | - _(process_span.total_recorded_links).must_equal(0) |
260 | | - |
261 | | - _(publish_span.trace_id).must_equal(process_span.trace_id) |
262 | | - _(process_span.parent_span_id).must_equal(publish_span.span_id) |
263 | | - _(process_span.attributes['success']).must_equal(true) |
264 | | - end |
265 | | - |
266 | 254 | describe 'with an async queue adapter' do |
267 | 255 | before do |
268 | 256 | begin |
|
284 | 272 | _(publish_span.trace_id).must_equal(process_span.trace_id) |
285 | 273 | _(process_span.parent_span_id).must_equal(publish_span.span_id) |
286 | 274 | end |
| 275 | + |
| 276 | + it 'propagates baggage' do |
| 277 | + ctx = OpenTelemetry::Baggage.set_value('testing_baggage', 'it_worked') |
| 278 | + OpenTelemetry::Context.with_current(ctx) do |
| 279 | + BaggageJob.perform_later |
| 280 | + end |
| 281 | + perform_enqueued_jobs |
| 282 | + |
| 283 | + _(process_span.total_recorded_links).must_equal(0) |
| 284 | + |
| 285 | + _(publish_span.trace_id).must_equal(process_span.trace_id) |
| 286 | + _(process_span.parent_span_id).must_equal(publish_span.span_id) |
| 287 | + _(process_span.attributes['success']).must_equal(true) |
| 288 | + end |
287 | 289 | end |
288 | 290 | end |
289 | 291 |
|
|
0 commit comments