Skip to content

Commit 9ede876

Browse files
committed
test(rails): restore the trace propagation payload headers example
1 parent 8429ff3 commit 9ede876

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎sentry-rails/spec/active_job/shared_examples/tracing/trace_propagation.rb‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ def perform
4646
end
4747
end
4848

49+
it "injects both sentry-trace and baggage propagation headers into the serialized payload" do
50+
within_parent_transaction do
51+
successful_job.perform_later
52+
end
53+
54+
headers = last_enqueued_payload["_sentry"]["trace_propagation_headers"]
55+
expect(headers.keys).to include("sentry-trace", "baggage")
56+
expect(headers["sentry-trace"]).not_to be_empty
57+
expect(headers["baggage"]).not_to be_empty
58+
end
59+
4960
it "captures a consumer transaction without raising when no parent transaction was active at enqueue" do
5061
expect { successful_job.perform_later }.not_to raise_error
5162
expect { drain }.not_to raise_error

0 commit comments

Comments
 (0)