grafana / pyroscope-dotnet

Dotnet profiler
Apache License 2.0
22 stars 4 forks source link

.NET config is not working inside a container #46

Open DmitreyKazin98 opened 8 months ago

DmitreyKazin98 commented 8 months ago

Hello,

I've been attempting to set up Grafana Pyroscope as per the instructions provided in the Grafana Pyroscope Docs. However, despite following the steps closely, I haven't been able to get it running correctly.

Here's a brief rundown of my setup:

I'm utilizing the mcr.microsoft.com/dotnet/runtime-deps:6.0-alpine as my base image. After setting up this base, I proceed to download and extract the necessary profiling files:

RUN wget https://github.com/grafana/pyroscope-dotnet/releases/download/v0.8.10-pyroscope/pyroscope.0.8.10-musl-x86_64.tar.gz && \
    tar xvzf pyroscope.0.8.10-musl-x86_64.tar.gz -C .

I've also configured the environment with the recommended default variables:

ENV PYROSCOPE_APPLICATION_NAME=web-api
ENV PYROSCOPE_SERVER_ADDRESS=http://pyroscope.profiling.svc.cluster.local:4040
ENV PYROSCOPE_PROFILING_ENABLED=1
ENV CORECLR_ENABLE_PROFILING=1
ENV CORECLR_PROFILER={BD1A650D-AC5D-4896-B64F-D6FA25D6B26A}
ENV CORECLR_PROFILER_PATH=Pyroscope.Profiler.Native.so
ENV LD_PRELOAD=Pyroscope.Linux.ApiWrapper.x64.so

Additionally, I've opted to use musl over glibc in line with the guidance on the Pyroscope Dotnet Profiler Docker Hub page.

Is there something I might be overlooking in this process?

Thanks for your assistance.

korniltsev commented 8 months ago

configuration seems good. Could you maybe try using absolute paths to the so files?

Also you could try looking into our example and try spot any other differences https://github.com/grafana/pyroscope/blob/aa7ff8c72b2ce67c3f9a9e42bff6f4a9e3f63fa1/examples/dotnet/rideshare/musl.Dockerfile#L9