Gatsby plugin to add Datadog logging to your site.

Learn more about Datadog here.


npm install --save gatsby-plugin-datadog-logs

How to use

// In your gatsby-config.js
plugins: [
    resolve: "gatsby-plugin-datadog-logs",
    options: {
      clientToken: '[YOUR_CLIENT_TOKEN]',
      site: '',
      sampleRate: 100,
      enabled: !IS_DEV,

Options available are same as the Datadog initialization parameters. Additionally, the parameter enabled (boolean) is available to easily turn the plugin integration on/off.

Now datadogLogs is available on the global window object, so you can use it like this:"Hello World!");