elastic / apm-agent-nodejs

https://www.elastic.co/guide/en/apm/agent/nodejs/current/index.html
BSD 2-Clause "Simplified" License
581 stars 224 forks source link

Integrate with winston #1287

Open Qard opened 5 years ago

Qard commented 5 years ago

Continuing from the ecosystem research in #1187, we've decided to integrate with winston.

jsumners commented 4 years ago

See my note in #1392 about getting support for many loggers much easier.

Qard commented 4 years ago

Not sure it's clear, but this issue is not about allowing winston to be used for the logger option in agent.start(...). That option is for directing log information internal to the agent to whatever source you choose.

This particular issue is about being able to capture use of winston for app logs and inject metadata alongside the log messages to allow associating them with the current transaction or span at the time the message is sent to the log.

jsumners commented 4 years ago

Carry on.

ggalihpp commented 3 years ago

Hello, I hope its the right thread to ask this question...

So I use winston-elasticsearch to integrate apmAPM with logs.

but currently have issue with APM always intercept the es cluster checking. Here's the log:

ntercepted call to @elastic/elasticsearch "request" event { id: 6, method: 'GET', path: '/_cluster/health' }

no active transaction found - cannot build new span

no active transaction found - cannot build new span

intercepted call to https.request { id: null }

Sending error to Elastic APM { id: '26eaa9a6affbab65d2a31736a8a0d141' }

no active transaction found - cannot build new span

intercepted call to https.request { id: null }

intercepted call to @elastic/elasticsearch "request" event { id: 7, method: 'GET', path: '/_cluster/health' }

no active transaction found - cannot build new span

no active transaction found - cannot build new span

intercepted call to https.request { id: null }

the quetion were:

  1. How to prevent apm to intercept this current cluster_health checking?

thanks in advance