Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdc88db0

Browse files
authored
docs: update transport.md (#2550)
* docs: update datadog transport* docs: update transports.md
1 parentc69cdb0 commitdc88db0

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 todatadog.
422+
[datadog-logger-integrations][38] is a transport to ship your logs toDataDog.
423423

424424
```javascript
425425
var winston=require('winston')
426-
varDatadogWinston=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-
newDatadogWinston({
435-
apiKey:'super_secret_datadog_api_key',
436-
hostname:'my_machine',
434+
newDataDogTransport({
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)

[8]ページ先頭

©2009-2025 Movatter.jp