Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@marfle/winston-transport-datadog

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marfle/winston-transport-datadog

Datadog logging transport for winston

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
44
increased by46.67%
Maintainers
3
Weekly downloads
 
Created
Source

winston-transport-datadog

npm (scoped) node (scoped)

winston transport for Datadog logging.

There are couple of winston transports for datadog. This one does buffering, error handling and uses tls-tcp instead of https.

Install

npm install @marfle/winston-transport-datadog

Usage

Use:

const { createLogger } = require('winston');
const { DatadogTransport } = require('@marfle/winston-transport-datadog');

logger = createLogger({
  transports: [
    new DatadogTransport({
      apiKey: '<YOUR API KEY',
      // optional metadata which will be merged with log message
      metadata: {
        environment: process.env.NODE_ENV,
        service: 'myService'
      }
    })
  ]
});

Options

NameDefaultDescription
apiKeyundefinedapi key from datadog
host'intake.logs.datadoghq.com'intake hostname
port10516intake port
bufferSize10000how many messages to buffer before discarding
reconnectInterval10000
socketOptions{ timeout: 10000 }options passed to tls.socket
metadata{ ddsource: 'winston' }optional metadata which will be merged with log message

DatadogTransport extends Transport from winston-transport, so it's options also apply.

License

MIT See LICENSE file.

About us

Marfle makes software for workboat fleets

Keywords

FAQs

Package last updated on 07 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc