Using Subtrace with Docker Compose
If you’re using Docker Compose to run your app, you can use Subtrace to monitor all of your backend 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"]Add the following lines to your service’s definition in your
compose.yamlfile:cap_add: - SYS_PTRACEStart your app as you normally would:
That’s it! Open the
subt.linkURL in your browser to see your app’s requests show up in real time:
It’s possible that the subt.link URL is printed from within a container.