Skip to content

test(parametric): make OTel span assertions v0.4/v1-agnostic.#7169

Draft
AlexeyKuznetsov-DD wants to merge 8 commits into
mainfrom
alexeyk/v1-dd-trace-java-span-events
Draft

test(parametric): make OTel span assertions v0.4/v1-agnostic.#7169
AlexeyKuznetsov-DD wants to merge 8 commits into
mainfrom
alexeyk/v1-dd-trace-java-span-events

Conversation

@AlexeyKuznetsov-DD

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Makes the parametric OTel span and span-event assertions protocol-agnostic for trace payloads that may arrive in either v0.4-style or v1.0-style shapes.

  • Adds is_same_boolean(..., is_otel_boolean=True) support for comparing boolean values represented as "true"/"false", native True/False, or OTel numeric 1/0.
  • Updates OTel span tests to read boolean attributes from merged meta/metrics data and to tolerate empty optional tracestate/attributes fields.
  • Uses retrieve_span_events() in span event tests instead of directly parsing span["meta"]["events"].
  • Extends native span-event attribute flattening so protocol v1 array attributes become plain Python lists.
  • Adds TEST_THE_TEST coverage for the boolean comparison helper.

Motivation

dd-trace-java protocol v1 span events serialize some OTel data differently from older trace formats. These changes keep the shared parametric assertions focused on behavior instead of the exact wire-format representation used by a tracer/protocol combination.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD requested review from a team as code owners June 18, 2026 02:09
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD requested review from mcculls and removed request for a team June 18, 2026 02:09
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Jun 18, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD marked this pull request as draft June 18, 2026 02:09
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jun 18, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 6d0800e | Docs | Datadog PR Page | Give us feedback!

@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/test_the_test/test_dd_types.py                                    @DataDog/system-tests-core
tests/parametric/test_otel_span_methods.py                              @DataDog/system-tests-core @DataDog/apm-sdk-capabilities
tests/parametric/test_span_events.py                                    @DataDog/system-tests-core @DataDog/apm-sdk-capabilities
tests/test_the_test/scenarios.json                                      @DataDog/system-tests-core
utils/dd_types/_utils.py                                                @DataDog/system-tests-core
utils/docker_fixtures/spec/trace.py                                     @DataDog/system-tests-core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant