test(parametric): add baggage span tags test for no trace context#7211
test(parametric): add baggage span tags test for no trace context#7211rachelyangdog wants to merge 3 commits into
Conversation
…nario Adds test_baggage_span_tags_no_trace_context to verify that baggage tags are applied to the local root span even when no upstream trace context (x-datadog-* or traceparent) is present — scenario 2 from the baggage RFC. Marks the test as missing_feature for golang, rust, dotnet, and cpp, consistent with the existing baggage span tag tests for those libraries. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa90117ea5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| _ = test_library.dd_make_child_span_and_get_headers( | ||
| [("baggage", "user.id=doggo,session.id=mysession,foo=bar")] |
There was a problem hiding this comment.
Gate baggage-only span-tag test for Java
When this new baggage-only case runs with TEST_LIBRARY=java, the Java parametric app drops baggage-only extraction before the child span is created: /trace/span/extract_headers returns span_id: null whenever the extracted context is null or has an empty span id (utils/build/docker/java/parametric/src/main/java/com/datadoghq/trace/opentracing/controller/OpenTracingController.java:204-210), and startSpan only attaches extracted context when a non-null parent id is provided (OpenTracingController.java:75-86). Since manifests/java.yml:3737 activates the whole Test_Headers_Baggage_Span_Tags class, this test will create an ordinary local root without the extracted baggage and fail the new tag assertions; please either update the Java parametric extraction path to preserve baggage-only context or add a Java manifest entry for this test.
Useful? React with 👍 / 👎.
…for java/nodejs/php/ruby Java's parametric server drops baggage-only extraction (span_id null when no trace context). PHP, Ruby, and Node.js parametric servers have the same issue. The actual tracers for PHP and Ruby handle scenario 2 correctly, but their parametric servers need fixes first. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PHP and Ruby tracers already apply baggage tags independently of trace context, but their parametric servers were dropping the extracted context when no trace span ID was present. PHP: add an elseif branch for the empty-string key (PHP coerces null array keys to "") so consume_distributed_tracing_headers is called even when no upstream span ID was extracted. Ruby: check DD_DIGEST[nil] before the active-span short-circuit so a baggage-only digest is passed as continue_from when parent_id is nil. Removes missing_feature for php and ruby. Go remains missing_feature because its tracer applies baggage tags only in the httptrace middleware, not in the core tracer.StartSpan path used by the parametric server. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds test_baggage_span_tags_no_trace_context to verify that baggage tags are applied to the local root span even when no upstream trace context (x-datadog-* or traceparent) is present — scenario 2 from the baggage RFC.
Marks the test as missing_feature for golang, rust, dotnet, and cpp, consistent with the existing baggage span tag tests for those libraries.
Motivation
Changes
Workflow
🚀 Once your PR is reviewed and the CI green, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
tests/ormanifests/is modified ? I have the approval from R&P teambuild-XXX-imagelabel is present