Missing mongo spans or distributed tracing for some endpoints

Kibana version:
7.4.0
Elasticsearch version:
7.4.0
APM Server version:
7.4.0
APM Agent language and version:

    Node: 12.14.0
    elastic-apm-node: 3.6.1
    express: 4.15.4
    mongoose: 5.0.14

Agent configuration:

{
  serviceName: 'cmp-server',
  asyncHooks: true,
  serverUrl: config.endpoints.serverAPMURL,
  ignoreUrls: [
    /^\/heartbeat/,
    /^\/static/,
    /^\/socket\.io.*/
  ],
  ignoreUserAgents: [
    'curl/',
    /pingdom/i
  ],
  sourceLinesSpanAppFrames: 5,
  breakdownMetrics: true,
  logUncaughtExceptions: true,
  usePathAsTransactionName: true
}

Note: without asyncHooks set to false no breakdown data(mongo/traces to other services) is collected
Browser version:
Google Chrome
Version 83.0.4103.116 (Official Build) (64-bit)
Original install method (e.g. download page, yum, deb, from source, etc.) and version:

Fresh install or upgraded from other version?
Fresh install
Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.
I have continuation-local-storage V3.2.0 installed for propagating requestId.
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):


Steps to reproduce:

  1. Launch APM server, elastic search, and Kibana containers
  2. Install elastic RUM in ractJs based client
  3. Install Node APM in the server
  4. Browse the application

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

**Additional Note

I am trying this out in development mode using docker containers. In production, stackdriver trace can detect the mongo breakdown for those endpoints.

I see that in different time different endpoints have the details transaction spans.

This is another example,

In most of the other micro-services the async hook works. The API gateway for the front-end is an old repo so there might be some offending packages that is massing with async hook.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.