orphanable option, drops jest-jasmine2 support, and removes support for older Next.js versions. This guide covers all breaking changes and the steps to upgrade.
Breaking changes
Node.js version requirement
dd-trace v4 requires Node.js >= 16. If your application runs on Node.js 14, you must upgrade Node.js before upgrading dd-trace.orphanable option removed
The orphanable span option has been removed. This option was only used internally for a single integration that has since been removed and was never useful for manual instrumentation.
To create a root span without a parent in manual instrumentation, pass childOf: null directly:
jest-jasmine2 support removed
The Jest integration no longer supports jest-jasmine2 as a test runner. Jest changed its default test runner to jest-circus approximately two years before this removal. If your Jest configuration explicitly sets testRunner: 'jest-jasmine2', you must switch to jest-circus.
Update your Jest configuration:
jest.config.js
Older Next.js versions no longer supported
dd-trace v4 supports only Next.js 10.2 and later. If your application uses an older version of Next.js, you must upgrade Next.js before upgrading dd-trace. Check your Next.js version:Upgrade steps
Upgrade Node.js to 16 or later
dd-trace v4 requires Node.js 16 or later. Update your runtime before upgrading the package.Update any
.nvmrc, .node-version, Dockerfile, or CI configuration files that pin your Node.js version.Switch from jest-jasmine2 to jest-circus (if applicable)
If your Jest configuration uses
jest-jasmine2, update it to use jest-circus before installing dd-trace v4.Remove any explicit testRunner: 'jest-jasmine2' setting from your Jest configuration. jest-circus is the default and no explicit configuration is needed.Upgrade Next.js to 10.2 or later (if applicable)
If your application uses Next.js older than 10.2, upgrade it:
Remove orphanable option usage
Search your codebase for any uses of the For each occurrence, replace with
orphanable option and replace them with childOf: null:{ childOf: null } in your span options.Version compatibility table
| dd-trace version | Node.js requirement | Status |
|---|---|---|
| v5 (current) | >= 18 | Current |
| v4 | >= 16 | EOL |
| v3 | >= 14 | EOL |
| v2 | >= 12 | EOL |
For any issues related to migrating, open an issue on the dd-trace-js GitHub repository or contact Datadog support.
