gpd
gatsby-plugin-datadog-logs
npm i gatsby-plugin-datadog-logs
gpd

gatsby-plugin-datadog-logs

Gatsby plugin to add Datadog logging to your site.

by Niklas Nordlund

1.0.1 (see all)License:MITTypeScript:Not FoundCategories:Gatsby Logging
npm i gatsby-plugin-datadog-logs
Readme

gatsby-plugin-datadog-logs

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

Learn more about Datadog here.

Install

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: 'datadoghq.com',
      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:

datadogLogs.logger.info("Hello World!");

Downloads/wk

10

GitHub Stars

0

LAST COMMIT

1yr ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
1.0.1
latest
1yr ago
No tutorials found
Add a tutorial