How can I add Datadog to Pino?
See original GitHub issue[x] I’ve read the docs of nestjs-pino
[x] I’ve read the docs of pino
[x] I couldn’t find the same question about nestjs-pino
How can I add Datadog to nest-js pino?
I tried using pino-datadog-transport package with following options
import { LoggerModule } from 'nestjs-pino';
@Module({
imports: [
LoggerModule.forRoot({
{
pinoHttp: {
transport: {
targets: [
{
options: {
ignore: 'pid,hostname',
levelFirst: true,
translateTime: 'UTC:dd/mm/yyyy, h:MM:ss TT Z',
},
target: 'pino-pretty',
level: 'debug',
},
{
level: 'debug',
target: 'pino-datadog-transport',
options: {
ddClientConf: {
authMethods: {
apiKeyAuth: config.DATADOG_API_KEY,
ddServerConf: { site: 'datadoghq.eu' },
ddSource: 'nodejs',
service: config.DATADOG_APP_NAME,
},
},
},
},
],
},
},
};
})
],
...
})
class MyModule {}
but it is not working. Please let me know how can I integrate Datadog with Pino in Nestjs with a working example, thank you.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
pino-datadog - npm
A transport for pino that sends messages to DataDog. Latest version: 2.0.2, last published: 2 years ago. Start using pino-datadog in your ...
Read more >A transport for pino that sends messages to DataDog - GitHub
A transport for pino that sends messages to DataDog - GitHub - ovhemert/pino-datadog: A transport for pino ... To include as a library...
Read more >pino-datadog-transport - NPM Package Overview - Socket.dev
A pino v7+ transport for sending logs to Datadog. It uses datadog-api-client-typescript to send logs using the client v2.LogsApi#submitLog ...
Read more >Make pino Log Messages Appear with the Correct Status in ...
How to correctly display the log level (status) in Datadog when using the pino logger. By default all messages are marked as 'info'-level....
Read more >Connecting Node.js Logs and Traces - Datadog Docs
Connect your Node.js logs and traces to correlate them in Datadog.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Got it working. It was configuration error in pino-datadog-transport.
@iamolegga I was able to make it work but there is one issue that the hostname and service name are not showing in Datadog. When I used the Winston nestjs package then the service name was showing.