fix(runtime): avoid native startup failures on Bun #11267
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 330 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.347
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #11267"
general
weight: 0.35
pabloerhard
What does this PR do?
Part of experimental Bun support. On Bun only,
config/index.jsturns off three features that crash or fail on Bun: native runtime metrics (runtimeMetrics.native), heap profiling (DD_PROFILING_HEAP_ENABLED) and IAST. The effective values are reported in configuration telemetry, and a diagnostic is logged when a user had explicitly enabled one of them.runtime_metrics.jsandprofiling/config.jsare unchanged from master.The deactivations share the existing unsupported-runtime block and retain Deno behavior. An unset heap flag is overridden only when the legacy profiler list selects
space; otherwise its default telemetry origin is preserved.Motivation
All changes are gated on
process.versions.bun, so Node behavior is unchanged.Additional Notes
npm run test:integration:bun: 20 passing. These cover native-metrics safety, IAST deactivation, and wall/timeline uploads with default settings, explicit heap enablement,DD_PROFILING_PROFILERS=space,wall, both together, and wall-only selection. Upload assertions checkwall/eventstypes and attachments, not JavaScript samples. On unchanged master the original scenarios abort, exit, or upload no profiles.npm run test:profiler: 222 passing, 5 pending. Changed-file ESLint andnpm run lint:editorconfigpass. The heap-origin regression fails on parent commit9cfc65784and passes with this fix.mocha-run-file.jswith file-redirected output produces two active-resource assertions on both the parent commit and this branch; the canonical suite runner passes. The first profiler invocation exited 1 with zero failing assertions; a rerun exited 0, and the initial cause is unconfirmed.Link to Devin session: https://datadog-poc.devinenterprise.com/sessions/6036e8df687647e7bf8c26793a98b08b
Open in Devin Desktop: https://datadog-poc.devinenterprise.com/desktop/session/6036e8df687647e7bf8c26793a98b08b?variant=devin
Requested by: @eam1813