dd-trace-js icon indicating copy to clipboard operation
dd-trace-js copied to clipboard

Errors being emitted and traces incomplete with APM

Open dennis-johnson-dev opened this issue 7 years ago • 5 comments

Description We're seeing a number of errors being emitted from the dd-trace JS library.

Here is the stack we're seeing:

Screen Shot 2019-07-30 at 1 57 11 PM

The application is a Node.js express server that is responding to a GET request. Our tracer configuration is very minimal (just enabling http, express, etc. plugins). It is required at the entrypoint of the application. We are not using the opentracing lib.

The problem seems to be from fields.tags - https://github.com/DataDog/dd-trace-js/blob/master/packages/dd-trace/src/opentracing/tracer.js#L81 being undefined and I'm not sure what the source of that issue is. Missing parent? Sampling?

In the UI Additionally, we are seeing in the DataDog UI a ton of incomplete traces for these requests. I've only seen 1 complete trace out of like 100 or so requests. Not sure if it is related, but could be related given the amount of errors we're seeing emitted. There is a separate /healthcheck resource and these traces do show up fairly regularly, but is quite limited compared to the endpoint we'd really like traces on.

Any thoughts or ideas?

Environment

  • Operation system: Linux (AWS AMI)
  • Node version: 10.15.3
  • Tracer version: 0.13.1
  • Agent version: 6.13.0

dennis-johnson-dev avatar Jul 30 '19 20:07 dennis-johnson-dev

cc @paul-salmon-ib

dennis-johnson-dev avatar Jul 30 '19 21:07 dennis-johnson-dev

The error has been fixed in 0.14.0.

About the incomplete traces, do you mean within the same process or with multiple distributed services? If the later, are all services using the Node tracer, or some of them are in other languages?

rochdev avatar Aug 01 '19 15:08 rochdev

Thanks for the bug fix!

It is a node process that calls out to elasticsearch, DynamoDB, etc, but does not call out to other instrumented microservices

dennis-johnson-dev avatar Aug 01 '19 16:08 dennis-johnson-dev

Are the missing parts available as their own traces in the individual services? Usually incomplete traces within a single process are caused by the scope that was lost, and the different parts end up in different traces. If that's the case, I can explain how to find where exactly the scope was lost.

rochdev avatar Aug 01 '19 16:08 rochdev

Once we updated to 0.14, our traces are showing up now. Looks like we just had a naming change. Thanks for your help @rochdev!!!

Will close 👍

dennis-johnson-dev avatar Aug 13 '19 16:08 dennis-johnson-dev