A set of plugins to interact with Datadog directly from your builds.
- This is a bundler plugin for
Webpack,
Vite,
ESBuild and
Rollup.
- Very easy to setup and disable on the fly.
Note
If you want to upgrade from v1 to v2, please follow our migration guide.
@datadog/esbuild-plugin
- Yarn
yarn add -D @datadog/esbuild-plugin
- NPM
npm install --save-dev @datadog/esbuild-plugin
const { datadogEsbuildPlugin } = require('@datadog/esbuild-plugin');
require('esbuild').build({
plugins: [
datadogEsbuildPlugin({
// Configuration
}),
],
});
Tip
It is important to have the plugin in the first position in order to report every other plugins.
@datadog/rollup-plugin
- Yarn
yarn add -D @datadog/rollup-plugin
- NPM
npm install --save-dev @datadog/rollup-plugin
Inside your rollup.config.js
.
import { datadogRollupPlugin } from '@datadog/rollup-plugin';
export default {
plugins: [
datadogRollupPlugin({
// Configuration
}),
],
};
Tip
It is important to have the plugin in the first position in order to report every other plugins.
@datadog/vite-plugin
- Yarn
yarn add -D @datadog/vite-plugin
- NPM
npm install --save-dev @datadog/vite-plugin
Inside your vite.config.js
.
import { datadogVitePlugin } from '@datadog/vite-plugin';
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [
datadogVitePlugin({
// Configuration
}),
],
};
Tip
It is important to have the plugin in the first position in order to report every other plugins.
@datadog/webpack-plugin
- Yarn
yarn add -D @datadog/webpack-plugin
- NPM
npm install --save-dev @datadog/webpack-plugin
Inside your webpack.config.js
.
const { datadogWebpackPlugin } = require('@datadog/webpack-plugin');
module.exports = {
plugins: [
datadogWebpackPlugin({
// Configuration
}),
],
};
Tip
It is important to have the plugin in the first position in order to report every other plugins.
Interact with our Real User Monitoring product (RUM) in Datadog directly from your build system.
datadogWebpackPlugin({
rum?: {
disabled?: boolean,
sourcemaps?: {
bailOnError?: boolean,
dryRun?: boolean,
intakeUrl?: string,
maxConcurrency?: number,
minifiedPathPrefix: string,
releaseVersion: string,
service: string,
},
}
});
π Full documentation β‘οΈ
Display and send telemetry data as metrics to Datadog.
datadogWebpackPlugin({
telemetry?: {
disabled?: boolean,
output?: boolean
| string
| {
destination: string,
timings?: boolean,
dependencies?: boolean,
bundler?: boolean,
metrics?: boolean,
logs?: boolean,
},
prefix?: string,
tags?: string[],
timestamp?: number,
filters?: ((metric: Metric) => Metric | null)[],
}
});
π Full documentation β‘οΈ
{
auth?: {
apiKey?: string;
endPoint?: string;
};
logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'none';
rum?: {
disabled?: boolean;
sourcemaps?: {
bailOnError?: boolean;
dryRun?: boolean;
intakeUrl?: string;
maxConcurrency?: number;
minifiedPathPrefix: string;
releaseVersion: string;
service: string;
};
};
telemetry?: {
disabled?: boolean;
output?: boolean
| string
| {
destination: string;
timings?: boolean;
dependencies?: boolean;
bundler?: boolean;
metrics?: boolean;
logs?: boolean;
};
prefix?: string;
tags?: string[];
timestamp?: number;
filters?: ((metric: Metric) => Metric | null)[];
}
}
default
null
In order to interact with Datadog, you have to use your own API Key.
default:
"app.datadoghq.com"
To which endpoint will the metrics be sent.
default:
'warn'
Which level of log do you want to show.
Check out the CONTRIBUTING.md file for more information.