Gatsby plugin to add Datadog log collection to your Gatsby site.

Learn more about Datadog here.


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

How to setup

// 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 programatically turn the plugin integration on/off.

How to use

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