DataDog Tracer on Meteor, has anyone done it before?

Hello I was wondering if anyone has done this to track their meteor apps https://docs.datadoghq.com/tracing/setup/nodejs/ I tried adding it following this guide but haven’t succed as Im not getting anything on the dd instance.

Thanks!

You could start the production build with -r argument, like:

“node -r trace.js bundle/main.js”

and in trace.js:

require(‘dd-trace’).init()

1 Like

Thanks, Im just lost on how to add this if Im building my app on aws pipelines, I have a staged step where I call meteor build build/ --allow-superuser --directory --architecture os.linux.x86_64 after that I build a docker image with this build docker build --build-arg NODE_VERSION=8.11.0 -t $REPOSITORY_URI:latest .
So on those steps where should I add this node -r trace.js bundle/main.js call?

Thanks again!

In the Dockerfile itself where COMMAND or ENTRYPOINT is defined. I don’t know if it’s exactly that line of code and I don’t know if it’s going to work, it’s just the concept using that command line option to preload datadog:

https://nodejs.org/api/cli.html#cli_r_require_module

So please post here once you were successful :wink:

1 Like

Great! thanks again for the help @kaufmae! and sure, as soon as I get it going will post back.