Using Subtrace with Docker
If your app runs in a Docker container, you can use Subtrace to monitor all its requests. Here’s how you can get started:
Make the following change to your
Dockerfileto install and use Subtrace in your app’s Docker image:- CMD ["node", "./app.js"] + RUN curl -fsSL https://subtrace.dev/install.sh | sh + CMD ["subtrace", "run", "--", "node", "./app.js"]Run your Docker container as you normally would, but add
--cap-add=SYS_PTRACE:- docker run -t -p 3000:3000 node-app + docker run -t -p 3000:3000 --cap-add=SYS_PTRACE node-app
Show example output
- That’s it! Open the
subt.linkURL in your browser to see your app’s requests show up in real time: