dd-trace-js
dd-trace-js copied to clipboard
[BUG]: auto-injected datalog-lib-js-init container crashing
Tracer Version(s)
5.35
Node.js Version(s)
22
Bug Report
Our team uses the Datadog Admission Controller to automatically inject the dd-trace library into our Express application. We originally defined our Helm chart as the following:
deployment:
labels:
admission.datadoghq.com/enabled: "true"
additionalPodAnnotations:
admission.datadoghq.com/js-lib.version: "latest"
However, starting on January 31, we observed the following error messages being emitted, followed by the datalog-lib-js-init container crashing and causing our entire pod to restart, approximately once every 5 minutes:
Error: Cannot find module '/datadog-lib/node_modules/dd-trace/init'
Require stack:
- internal/preload
at Function._resolveFilename (node:internal/modules/cjs/loader:1244:15)
at Function._load (node:internal/modules/cjs/loader:1070:27)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1335:12)
at node:internal/modules/cjs/loader:1834:12
at loadPreloadModules (node:internal/process/pre_execution:726:5)
at setupUserModules (node:internal/process/pre_execution:206:5)
at prepareExecution (node:internal/process/pre_execution:159:5)
at prepareMainThreadExecution (node:internal/process/pre_execution:54:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'internal/preload' ]
}
We noticed that the timing of these errors starting correlated with the release of v5.34 making its way to Docker Hub, and since our Helm just defines the latest tag, this was the likely culprit. Pinning to the last released version of the library before these errors started occurring (5.31 in our case) fixed this crashing.
Reproduction Code
No response
Error Logs
No response
Tracer Config
No response
Operating System
No response
Bundling
No Bundling