Skip to content

Support v1 trace format from libraries#6360

Merged
cbeauchesne merged 21 commits intomainfrom
cbeauchesne/v1-traces
Feb 23, 2026
Merged

Support v1 trace format from libraries#6360
cbeauchesne merged 21 commits intomainfrom
cbeauchesne/v1-traces

Conversation

@cbeauchesne
Copy link
Copy Markdown
Collaborator

Motivation

dd-trace-go uses by default v1 format

Changes

wrapper traces and spans into a class that hides the differences between those two formats

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 20, 2026

CODEOWNERS have been resolved as:

utils/dd_types/__init__.py                                              @DataDog/system-tests-core
utils/dd_types/_datadog_trace.py                                        @DataDog/system-tests-core
manifests/agent.yml                                                     @DataDog/system-tests-core
manifests/golang.yml                                                    @DataDog/dd-trace-go-guild
tests/ai_guard/test_ai_guard_sdk.py                                     @DataDog/k9-ai-guard @DataDog/system-tests-core
tests/appsec/rasp/test_api10.py                                         @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_asm_standalone.py                                     @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_automated_login_events.py                             @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_automated_payment_events.py                           @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_blocking_addresses.py                                 @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_client_ip.py                                          @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_conf.py                                               @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_event_tracking.py                                     @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_event_tracking_v2.py                                  @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_identify.py                                           @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_inferred_spans.py                                     @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_remote_config_rule_changes.py                         @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_reports.py                                            @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_shell_execution.py                                    @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_span_tags_headers.py                                  @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_trace_tagging.py                                      @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_traces.py                                             @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/test_user_blocking_full_denylist.py                        @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/waf/test_addresses.py                                      @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/waf/test_blocking.py                                       @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/waf/test_blocking_security_response_id.py                  @DataDog/asm-libraries @DataDog/system-tests-core
tests/appsec/waf/test_reports.py                                        @DataDog/asm-libraries @DataDog/system-tests-core
tests/integrations/crossed_integrations/test_kafka.py                   @DataDog/system-tests-core
tests/integrations/crossed_integrations/test_kinesis.py                 @DataDog/system-tests-core
tests/integrations/crossed_integrations/test_rabbitmq.py                @DataDog/system-tests-core
tests/integrations/crossed_integrations/test_sns_to_sqs.py              @DataDog/system-tests-core
tests/integrations/crossed_integrations/test_sqs.py                     @DataDog/system-tests-core
tests/integrations/test_dbm.py                                          @DataDog/system-tests-core
tests/integrations/test_inferred_proxy.py                               @DataDog/system-tests-core
tests/serverless/span_pointers/utils.py                                 @DataDog/serverless @DataDog/system-tests-core
tests/test_data_integrity.py                                            @DataDog/system-tests-core
tests/test_distributed.py                                               @DataDog/system-tests-core
tests/test_graphql.py                                                   @DataDog/system-tests-core
tests/test_identify.py                                                  @DataDog/system-tests-core
tests/test_protobuf.py                                                  @DataDog/system-tests-core
tests/test_sampling_rates.py                                            @DataDog/system-tests-core
tests/test_scrubbing.py                                                 @DataDog/system-tests-core
tests/test_semantic_conventions.py                                      @DataDog/system-tests-core
tests/test_the_test/test_deserializer.py                                @DataDog/system-tests-core
tests/test_v1_payloads.py                                               @DataDog/system-tests-core
utils/_context/_scenarios/endtoend.py                                   @DataDog/system-tests-core
utils/interfaces/_library/appsec.py                                     @DataDog/system-tests-core
utils/interfaces/_library/core.py                                       @DataDog/system-tests-core
utils/proxy/traces/trace_v1.py                                          @DataDog/system-tests-core
utils/tools.py                                                          @DataDog/system-tests-core

@cbeauchesne cbeauchesne changed the title Cbeauchesne/v1 traces Support v1 trace format Feb 20, 2026
@datadog-official
Copy link
Copy Markdown

datadog-official Bot commented Feb 20, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e0f9e87 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@cbeauchesne cbeauchesne changed the title Support v1 trace format Support v1 trace format from libraries Feb 21, 2026
@cbeauchesne cbeauchesne marked this pull request as ready for review February 23, 2026 07:52
@cbeauchesne cbeauchesne requested review from a team as code owners February 23, 2026 07:52
@cbeauchesne cbeauchesne requested a review from a team as a code owner February 23, 2026 07:52
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0f9e875a7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +162 to +163
if key in ("meta", "meta_struct", "metrics"):
return self.raw_span["attributes"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Respect default when v1 span metadata is missing

DataDogSpanV1.get() returns self.raw_span["attributes"] for meta/meta_struct/metrics without honoring the caller-provided default. If a v1 span omits the attributes field (valid for spans with no tags/metrics), calls like span.get("meta", {}) now raise KeyError instead of returning {}, which can break request matching and AppSec/span validators that rely on safe .get(...) access patterns.

Useful? React with 👍 / 👎.

@cbeauchesne cbeauchesne merged commit dde532e into main Feb 23, 2026
2079 checks passed
@cbeauchesne cbeauchesne deleted the cbeauchesne/v1-traces branch February 23, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant