This guide will help you set up pyroscope with Docker Compose.
Pyroscope consists of 2 parts:
- Pyroscope Server — database + UI that stores and visualizes profiling data
- Pyroscope Agent — software that profiles your application
Check out the examples folder in our repository for examples of go, ruby and python apps running in docker with pyroscope.
Adding Pyroscope to your docker-compose file
Step 1. Adding Pyroscope Server to Docker Compose
pyroscope service and expose port 4040:
Step 2. Adding Pyroscope Agent to your existing application
If you're using Go, add this code to your application: