fix(profiling): respect ZAI_CONFIG_ORIGIN_DEFAULT for agent endpoint detection#3677
fix(profiling): respect ZAI_CONFIG_ORIGIN_DEFAULT for agent endpoint detection#3677morrisonlevi merged 2 commits intomasterfrom
Conversation
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
|
✨ Fix all issues with BitsAI or with Cursor
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3677 +/- ##
==========================================
- Coverage 62.19% 62.08% -0.12%
==========================================
Files 141 141
Lines 13352 13352
Branches 1746 1746
==========================================
- Hits 8304 8289 -15
- Misses 4256 4270 +14
- Partials 792 793 +1 see 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Benchmarks [ profiler ]Benchmark execution time: 2026-02-26 13:20:34 Comparing candidate commit a1903e7 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 29 metrics, 7 unstable metrics. |
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
morrisonlevi
left a comment
There was a problem hiding this comment.
package-oci failures are unrelated. Merging.
Description
Since
a3409cd78,DD_AGENT_HOSTandDD_TRACE_AGENT_PORThave non-empty defaults ("localhost"/8126). The PHP tracer already filters these withZAI_CONFIG_ORIGIN_DEFAULTchecks, but the Rust profiling code was not updated — causingagent_host()andtrace_agent_port()to returnSome(...)unconditionally and bypass the Unix socket fallback that SSI environments rely on.Fix: adds
ddog_php_prof_config_is_set_by_user()(checksname_index != ZAI_CONFIG_ORIGIN_DEFAULT) and gates both functions on it.Also pins
cargo install cbindgento--version 0.29.0 --lockedto avoidgetrandom v0.4.1pulling inedition2024support, which requires Cargo ≥ 1.85 (container is on 1.84.1).Reviewer checklist