Support v1 trace format from libraries#6360
Conversation
|
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: e0f9e87 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
There was a problem hiding this comment.
💡 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".
| if key in ("meta", "meta_struct", "metrics"): | ||
| return self.raw_span["attributes"] |
There was a problem hiding this comment.
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 👍 / 👎.
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
🚀 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