Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add datadog winston transport #1656

Merged
merged 1 commit into from
Jun 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ there are additional transports written by
* [Cassandra](#cassandra-transport)
* [Cisco Spark](#cisco-spark-transport)
* [Cloudant](#cloudant)
* [Datadog](#datadog-transport)
* [Elasticsearch](#elasticsearch-transport)
* [FastFileRotate](#fastfilerotate-transport)
* [Google Stackdriver Logging](#google-stackdriver-transport)
Expand Down Expand Up @@ -402,6 +403,36 @@ The Cloudant transport takes the following options:
db : Name of the databasename to put logs in
logstash : Write logs in logstash format

### Datadog Transport
[datadog-winston][38] is a transport to ship your logs to datadog.

```javascript
var winston = require('winston')
var DatadogWinston = require('datadog-winston')

var logger = winston.createLogger({
// Whatever options you need
// Refer https://github.com/winstonjs/winston#creating-your-own-logger
})

logger.add(
new DatadogWinston({
apiKey: 'super_secret_datadog_api_key',
hostname: 'my_machine',
service: 'super_service',
ddsource: 'node.js',
ddtags: 'foo:bar,boo:baz'
})
)
```

Options:
* __apiKey__: Your datadog api key *[required]*
* __hostname__: The machine/server hostname
* __service__: The name of the application or service generating the logs
* __ddsource__: The technology from which the logs originated
* __ddtags__: Metadata assoicated with the logs

### Google Stackdriver Transport

[@google-cloud/logging-winston][29] provides a transport to relay your log messages to [Stackdriver Logging][30].
Expand Down Expand Up @@ -798,3 +829,4 @@ That's why we say it's a logger for just about everything
[35]: https://github.com/SerayaEryn/fast-file-rotate
[36]: https://github.com/inspiredjw/winston-dynamodb
[37]: https://github.com/logdna/logdna-winston
[38]: https://github.com/itsfadnis/datadog-winston