From 34bd133ecdb09e37ee537e26ddc3647c108ed3fc Mon Sep 17 00:00:00 2001 From: itoktsnhc Date: Wed, 6 Sep 2023 17:41:34 +0800 Subject: [PATCH] add py scope --- Stat.Itok.Worker/Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Stat.Itok.Worker/Dockerfile b/Stat.Itok.Worker/Dockerfile index 6d62ec2..e463c3a 100644 --- a/Stat.Itok.Worker/Dockerfile +++ b/Stat.Itok.Worker/Dockerfile @@ -17,4 +17,20 @@ RUN dotnet publish "Stat.Itok.Worker.csproj" -c Release -o /app/publish /p:UseAp FROM base AS final WORKDIR /app COPY --from=publish /app/publish . + +COPY ./_misc /home/ +ENV CORECLR_ENABLE_PROFILING=1 +ENV CORECLR_PROFILER={BD1A650D-AC5D-4896-B64F-D6FA25D6B26A} +ENV CORECLR_PROFILER_PATH=/home/Pyroscope.Profiler.Native.so +ENV LD_PRELOAD=/home/Pyroscope.Linux.ApiWrapper.x64.so + +ENV PYROSCOPE_APPLICATION_NAME=stat.itok.worker +ENV PYROSCOPE_SERVER_ADDRESS=http://pyroscope:4040/ +ENV PYROSCOPE_LOG_LEVEL=debug +ENV PYROSCOPE_PROFILING_ENABLED=1 +ENV PYROSCOPE_PROFILING_ALLOCATION_ENABLED=true +ENV PYROSCOPE_PROFILING_CONTENTION_ENABLED=true +ENV PYROSCOPE_PROFILING_EXCEPTION_ENABLED=true + + ENTRYPOINT ["dotnet", "Stat.Itok.Worker.dll"]