fix(agentless): fix agentless crashtracking setup - #10175
Conversation
Setting the correct env variables, and don't override the intake-settings of the crashtracker itself for no reason.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Overall package sizeSelf size: 8.83 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.4.0 | 127.33 kB | 447.04 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #10175 +/- ##
===========================================
- Coverage 98.65% 59.57% -39.08%
===========================================
Files 1005 617 -388
Lines 157435 109495 -47940
Branches 74 58 -16
===========================================
- Hits 155312 65232 -90080
- Misses 2123 44263 +42140
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
BenchmarksBenchmark execution time: 2026-09-07 18:50:57 Comparing candidate commit 743e58f in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2306 metrics, 7 unstable metrics.
|
BridgeAR
left a comment
There was a problem hiding this comment.
If we want to lower case the site, we should do it as transformer in supported-configuration.json
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68e83962d5
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const url = config.DD_AGENTLESS_ENABLED ? getAgentlessTelemetryUrl(config.site) : config.url | ||
| const endpoint = { |
There was a problem hiding this comment.
Remove the duplicated endpoint declaration
When DD_CRASHTRACKING_ENABLED is true, Node cannot parse this module because the appended block leaves the preceding else structure malformed and redeclares endpoint. crashtracking/index.js catches that load failure and substitutes the noop implementation, so crash reports are silently disabled for every affected main-thread process.
Useful? React with 👍 / 👎.
Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de>
68e8396 to
8cfe517
Compare
BridgeAR
left a comment
There was a problem hiding this comment.
This seems to actually not work as expected. Please verify this against libdatadog once more
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 743e58fbcc
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| sinon.assert.calledOnce(binding.init) | ||
| assert.strictEqual(binding.init.firstCall.args[0].endpoint, null) | ||
| assert.deepStrictEqual(binding.init.firstCall.args[0].endpoint, { |
There was a problem hiding this comment.
Align the endpoint assertion with the undefined endpoint
In agentless mode, #getConfig() now always supplies undefined for endpoint, so this new assertion expecting a populated telemetry endpoint deterministically fails in the Linux crashtracker unit suite. Update the expectation to match the environment-controlled configuration, or restore the endpoint construction if that remains intended.
AGENTS.md reference: AGENTS.md:L32-L38
Useful? React with 👍 / 👎.
| // libdatadog v43 parses the dedicated URL above but does not use it when constructing the | ||
| // endpoint. Keep this compatibility fallback until its telemetry config honors that setting. | ||
| ['DD_TRACE_AGENT_URL', telemetryUrl], | ||
| ['DD_CRASHTRACKING_ERRORS_INTAKE_ENABLED', 'true'], |
There was a problem hiding this comment.
Redirect telemetry in the agentless integration fixture
In the required platform.yml crashtracking job, the agentless fixture redirects only DD_ERRORS_INTAKE_DD_URL; it previously redirected telemetry through the helper stub and the environment entries removed here. Since the production code now leaves endpoint undefined and no longer loads that helper, telemetry goes to the site-derived external intake rather than the fixture's local server, so collectAgentlessCrashRequests() never observes /api/v2/apmtelemetry and times out. Add the native telemetry URL override to the receiver environment in the fixture.
AGENTS.md reference: AGENTS.md:L153-L159
Useful? React with 👍 / 👎.
Setting the correct env variables, and don't override the intake-settings of the crashtracker itself for no reason.