This guide will help you set up pyroscope with Docker.
Check out the examples folder in our repository for examples of go, ruby and python apps running in docker with pyroscope.
Pyroscope Server is the database + UI that stores and visualizes profiling data.
pyroscope server from docker is pretty straighforward, we have a docker image that exposes port 4040:
Open http://localhost:4040/ to see Pyroscope UI.
Pyroscope Exec (Python / Ruby)
To profile your Python or Ruby code running inside a docker container you'll first need to add
pyroscope binary to that Docker container so that you could use
pyroscope exec command.
pyroscope binary to your docker image, use
COPY --from command:
pyroscope exec depends on
ptrace, so when running the docker container, make sure to add
--cap-add=sys_ptrace to your
docker run command. You can read more about this here.
In docker-compose you'll need to add the following code: