Hello,
I have a spring boot application that I want to run in a docker container and profile with pyroscope.
My Dockerfile is like this:
FROM eclipse-temurin:21.0.3_9-jre
RUN mkdir logs
ENV PYROSCOPE_APPLICATION_NAME=cart-api
ENV PYROSCOPE_PROFILING_INTERVAL=10ms
ENV PYROSCOPE_PROFILER_EVENT=cpu
ENV PYROSCOPE_PROFILER_LOCK=10ms
ENV PYROSCOPE_PROFILER_ALLOC=512k
ENV PYROSCOPE_UPLOAD_INTERVAL=15s
ENV PYROSCOPE_LOG_LEVEL=debug
ENV PYROSCOPE_SERVER_ADDRESS=http://pyroscope:4040
ADD pyroscope.jar /pyroscope.jar
ADD cart-api-0.0.1-SNAPSHOT.jar /app.jar
EXPOSE 8080
EXPOSE 8282
CMD java -javaagent:pyroscope.jar -jar -Dspring.profiles.active=hml /app.jar
My docker-compose is like this:
app:
build: app
volumes:
- ${LOGS_DIR}:/logs
networks:
- cart
ports:
- "8080:8080"
- "8082:8082"
depends_on:
- tempo
privileged: true
In the logs I can see messages like the following
2024-05-03 10:18:00.990 [DEBUG] Upload attempt 1 to http://pyroscope:4040/ingest?name=cart-api&units=samples&aggregationType=sum&from=1714731471&until=1714731480&spyName=javaspy&sampleRate=100&format=jfr. 2024-05-03T10:17:51.202126548Z 2024-05-03T10:18:00.925858080Z JFR: 1454545, labels: 0
which makes me believe that data is being sent to tempo. But when I look into pyroscope, the application seems to have only memory related information

Shouldn’t it have also the cpu related information? Is my configuration wrong?