Interact with Error Tracking directly from your build system.
- Configuration
- Sourcemaps Upload
- errorTracking.sourcemaps.bailOnError
- errorTracking.sourcemaps.debugId
- errorTracking.sourcemaps.dryRun
- errorTracking.sourcemaps.experimentalDuplicateCheck
- errorTracking.sourcemaps.maxConcurrency
- errorTracking.sourcemaps.minifiedPathPrefix
- errorTracking.sourcemaps.releaseVersion
- errorTracking.sourcemaps.service
errorTracking?: {
enable?: boolean;
sourcemaps?:
| {
bailOnError?: boolean;
debugId: true;
dryRun?: boolean;
experimentalDuplicateCheck?: boolean;
maxConcurrency?: number;
}
| {
bailOnError?: boolean;
debugId?: false;
dryRun?: boolean;
maxConcurrency?: number;
minifiedPathPrefix: string;
releaseVersion?: string;
service: string;
};
}default:
truewhen anerrorTrackingconfig block is present,falseotherwise.
Enable or disable the plugin without removing its configuration.
Must be a boolean. Non-boolean values are coerced today but will be rejected in a future major release.
Upload JavaScript sourcemaps to Datadog to un-minify your errors.
For new debug ID configurations, use the top-level sourcemaps option:
datadogWebpackPlugin({
auth: {
apiKey: process.env.DATADOG_API_KEY,
},
sourcemaps: {
debugId: true,
upload: true,
},
});Existing errorTracking.sourcemaps configurations remain supported. Configure errorTracking.sourcemaps.debugId: true to upload by debug ID, or configure service, releaseVersion, and minifiedPathPrefix to use service/version matching. These two upload-matching strategies are mutually exclusive. RUM source code context may still include service and version alongside an injected debug ID because that metadata is independent of source-map matching.
Note
You can override the domain used in the request with the DATADOG_SITE environment variable or the auth.site options (eg. datadoghq.eu).
You can override the full intake URL by setting the DATADOG_SOURCEMAP_INTAKE_URL environment variable (eg. https://sourcemap-intake.datadoghq.com/v1/input).
default:
false
Should the upload of sourcemaps fail the build on first error?
default:
false
Upload source maps using the debug IDs injected with rum.sourceCodeContext.debugId: true.
default:
false
It will not upload the sourcemaps to Datadog, but will do everything else.
default:
false
Only applies when errorTracking.sourcemaps.debugId is enabled.
Query the check_exists endpoint before upload and skip sourcemaps whose debug IDs already exist. If the check fails, upload proceeds as usual.
default:
20
Number of concurrent upload to the API.
required
Should be a prefix common to all your JS source files, depending on the URL they are served from.
The prefix can be a full URL or an absolute path.
Example: if you're uploading dist/file.js to https://example.com/static/file.js, you can use minifiedPathPrefix: 'https://example.com/static/' or minifiedPathPrefix: '/static/'.minifiedPathPrefix: '/' is a valid input when you upload JS at the root directory of the server.
required (or set via
metadata.version)
Is similar and will be used to match the version tag set on the RUM SDK.
If omitted, the plugin falls back to the shared top-level metadata.version. At least one of the two must be set.
required
Should be set as the name of the service you're uploading sourcemaps for, and Datadog will use this service name to find the corresponding sourcemaps based on the service tag set on the RUM SDK.
Note
If you get the error Error: No git remotes available,
you can disable the git integration via the enableGit configuration at the root.
It will also remove any usage of git for additional information on your files.