Skip to content

Commit dc88db0

Browse files
authored
docs: update transport.md (#2550)
* docs: update datadog transport * docs: update transports.md
1 parent c69cdb0 commit dc88db0

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

docs/transports.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -419,31 +419,33 @@ The Cloudant transport takes the following options:
419419
logstash : Write logs in logstash format
420420

421421
### Datadog Transport
422-
[datadog-winston][38] is a transport to ship your logs to datadog.
422+
[datadog-logger-integrations][38] is a transport to ship your logs to DataDog.
423423

424424
```javascript
425425
var winston = require('winston')
426-
var DatadogWinston = require('datadog-winston')
426+
var { DataDogTransport } = require('datadog-logger-integrations/winston')
427427

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

433433
logger.add(
434-
new DatadogWinston({
435-
apiKey: 'super_secret_datadog_api_key',
436-
hostname: 'my_machine',
434+
new DataDogTransport({
435+
ddClientConfig: {
436+
authMethods: {
437+
apiKeyAuth: apiKey,
438+
},
439+
},
437440
service: 'super_service',
438-
ddsource: 'nodejs',
439-
ddtags: 'foo:bar,boo:baz'
441+
ddSource: 'nodejs',
442+
ddTags: 'foo:bar,boo:baz'
440443
})
441444
)
442445
```
443446

444447
Options:
445-
* __apiKey__: Your datadog api key *[required]*
446-
* __hostname__: The machine/server hostname
448+
* __ddClientConfig__: DataDog client config *[required]*
447449
* __service__: The name of the application or service generating the logs
448450
* __ddsource__: The technology from which the logs originated
449451
* __ddtags__: Metadata associated with the logs
@@ -1118,7 +1120,7 @@ That's why we say it's a logger for just about everything
11181120
[35]: https://github.com/SerayaEryn/fast-file-rotate
11191121
[36]: https://github.com/inspiredjw/winston-dynamodb
11201122
[37]: https://github.com/logdna/logdna-winston
1121-
[38]: https://github.com/itsfadnis/datadog-winston
1123+
[38]: https://github.com/marklai1998/datadog-logger-integrations
11221124
[39]: https://github.com/TheAppleFreak/winston-slack-webhook-transport
11231125
[40]: https://github.com/punkish/winston-better-sqlite3
11241126
[41]: https://github.com/aandrewww/winston-transport-sentry-node

0 commit comments

Comments
 (0)