0.1.0-pre1 • Published 2 years ago

@twilio-labs/docusaurus-plugin-datadog-rum v0.1.0-pre1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

docusaurus-plugin-datadog-rum

Integrates Datadog RUM with your Docusaurus site.

Installation

npm install --save @twilio-labs/docusaurus-plugin-datadog-rum

Or, if you prefer Yarn:

yarn add @twilio-labs/docusaurus-plugin-datadog-rum

Configuration

Accepted fields:

NameTypeDefaultDescription
clientTokenstringRequiredThe client token for your Datadog RUM application
applicationIdstringRequiredThe application ID for your Datadog RUM application
servicestring"docusaurus"The name your service will show within the Datadog UI
envstringprocess.env.NODE_ENVThe environment of your deployed application

To create your application:

  1. Login to Datadog
  2. Choose UX Monitoring > RUM Applications
  3. Click New Application
  4. Choose JS (JavaScript) for the Application type
  5. Enter an Application name
  6. Click Create New RUM Application
  7. Under Instrument your application, choose the NPM type and find your clientToken and applicationId in the code sample that you can copy into your docusaurus.config.js.

Screenshot

If you already have an existing application created, instead of steps 3-6, click the Edit Application button next to your application and continue at step 7.

Example configuration

docusaurus.config.js

  plugins: [
    [
      "@twilio-labs/docusaurus-plugin-datadog-rum",
      {
        clientToken: "3EBOWfRPv8qwertyZXCvbnMAsD2f1g0Hf96",
        applicationId: "01234567-89ab-cdef-0123-456789abcdef",
        service: "my-docusaurus-site"
      },
    ],
  ],