Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files
🚀 New features to boost your workflow:
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 7cf57c5 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
BenchmarksBenchmark execution time: 2026-03-25 22:04:52 Comparing candidate commit 7cf57c5 in PR branch Found 0 performance improvements and 13 performance regressions! Performance is the same for 202 metrics, 9 unstable metrics.
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
darccio
left a comment
There was a problem hiding this comment.
In general it's fine, but the regressions must be addressed.
I'm curious why we need to set _dd.span_links when we could just postpone the serialization until the very moment we really need to.
| log.Warn("failed to serialize unsupported fieldValue type for field %d", fieldID) | ||
| buf = st.serialize(serializationFailed, buf) |
There was a problem hiding this comment.
These lines increases encodeField inlining cost, altering how this function can inline too its own callees.
$ go build -gcflags="-m=2" ./ddtrace/tracer/ | grep encodeField
# main: encodeField[go.shape.string]: cost 667 exceeds budget 80
# PR: encodeField[go.shape.string]: cost 801 exceeds budget 80
We can reduce the inlining cost by wrapping log.Warn in a go:noinline-tagged function:
//go:noinline
func warnUnsupportedFieldValue(fieldID uint32) {
log.Warn("failed to serialize unsupported fieldValue type for field %d", fieldID)
}| _, containsSpanLinks := span.meta["_dd.span_links"] | ||
| if containsSpanLinks { | ||
| size-- | ||
| } |
There was a problem hiding this comment.
This causes part of the execution time regressions. This can be changed to:
| } | |
| size := len(span.metrics) + len(span.metaStruct) | |
| for k := range span.meta { | |
| if k != "_dd.span_links" { | |
| size++ | |
| } | |
| } |
What does this PR do?
Motivation
Align with RFC and Java implementation.
Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!