APM .NET agent doesn't show activity for applications running in ECS/Fargate tasks

Hi everybody,

I’m using the following Dockerfile to build an image that then is deployed within ECS Tasks:

FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build


COPY . .

WORKDIR /wrk/some/path

RUN dotnet publish -c Release -o /app

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS runtime

# Install the new relic agent

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-netcore20-agent

# Enable the new relic agent


CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} \

CORECLR_NEWRELIC_HOME=/usr/local/newrelic-netcore20-agent \

CORECLR_PROFILER_PATH=/usr/local/newrelic-netcore20-agent/libNewRelicProfiler.so \




COPY --from=build /app .


ENTRYPOINT ["dotnet", "App.dll"]

When I go to APM overview in one.newlic.com I don’t see anything related to the application (not even the application name or ID).

The tasks are in private subnets, outbound rules allow all traffic and each private subnet has internet connection (NAT gateways attached).

Running the exact same image on a local machine it’s a different story: metrics can be viewed on APM overview section as expected. I didn’t see any specific documentation for AWS ECS (Fargate) so I’m not quite sure if additional steps should be followed.

Thanks in advance!