3.1.0 • Published 9 months ago

@loglayer/transport-datadog v3.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Datadog Transport for LogLayer

NPM Version NPM Downloads TypeScript

The DataDog transport for the LogLayer logging library.

Ships logs to DataDog using the datadog-transport-common library.

Important Notes

  • Only works server-side (not in browsers)
  • You will not get any console output since this sends directly to DataDog. Use the onDebug option to log out messages.

Installation

npm install loglayer @loglayer/transport-datadog serialize-error

Usage

import { LogLayer } from 'loglayer'
import { DataDogTransport } from "@loglayer/transport-datadog"
import { serializeError } from "serialize-error";

const log = new LogLayer({
  errorSerializer: serializeError,
  transport: new DataDogTransport({
    options: {
      ddClientConf: {
        authMethods: {
          apiKeyAuth: "YOUR_API_KEY",
        },
      },
      ddServerConf: {
        // Note: This must match the site you use for your DataDog login - See below for more info
        site: "datadoghq.eu"
      },
      onDebug: (msg) => {
        console.log(msg);
      },
      onError: (err, logs) => {
        console.error(err, logs);
      },
    },
  })
})

See the documentation for more information.

3.1.0

9 months ago

3.0.4

11 months ago

3.0.3

11 months ago

3.0.2

11 months ago

3.0.1

12 months ago

3.0.0

12 months ago

2.0.11

12 months ago

2.0.10

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago