From bb5a593dd843d902d55adda8b691c95f8c45c5b7 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Sat, 6 Apr 2024 18:46:16 +1300 Subject: [PATCH] add new relic instrumentation --- Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1e2108d..76a7c99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build + WORKDIR /app COPY . ./ @@ -18,4 +19,18 @@ WORKDIR /app COPY --from=build /app/out ./ +RUN apt-get update && apt-get install -y wget ca-certificates gnupg \ + && echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | tee /etc/apt/sources.list.d/newrelic.list \ + && wget https://download.newrelic.com/548C16BF.gpg \ + && apt-key add 548C16BF.gpg \ + && apt-get update \ + && apt-get install -y 'newrelic-dotnet-agent' \ + && rm -rf /var/lib/apt/lists/* + +ENV CORECLR_ENABLE_PROFILING=1 \ + CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} \ + CORECLR_NEWRELIC_HOME=/usr/local/newrelic-dotnet-agent \ + CORECLR_PROFILER_PATH=/usr/local/newrelic-dotnet-agent/libNewRelicProfiler.so \ + NEW_RELIC_APP_NAME="Satellite.API" + ENTRYPOINT ["dotnet", "Satellite.API.dll"]