test(parametric): make OTel span assertions v0.4/v1-agnostic.#7169
Draft
AlexeyKuznetsov-DD wants to merge 8 commits into
Draft
test(parametric): make OTel span assertions v0.4/v1-agnostic.#7169AlexeyKuznetsov-DD wants to merge 8 commits into
AlexeyKuznetsov-DD wants to merge 8 commits into
Conversation
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 6d0800e | Docs | Datadog PR Page | Give us feedback! |
Contributor
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 orv1.0-style shapes.is_same_boolean(..., is_otel_boolean=True)support for comparing boolean values represented as"true"/"false", nativeTrue/False, or OTel numeric1/0.meta/metricsdata and to tolerate empty optionaltracestate/attributesfields.retrieve_span_events()in span event tests instead of directly parsingspan["meta"]["events"].v1array attributes become plain Python lists.TEST_THE_TESTcoverage for the boolean comparison helper.Motivation
dd-trace-javaprotocolv1span 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.