newrelic-dotnet-agent icon indicating copy to clipboard operation
newrelic-dotnet-agent copied to clipboard

NewRelic.Agent NuGet package does not work on linux-arm64

Open RobinsonWM opened this issue 3 years ago • 2 comments

Description When I run my application on linux-arm64 instead of linux-x64, it does not report any data to New Relic APM. I am using the NewRelic.Agent NuGet package 10.0.0 to install the .NET agent.

I am building almost-identical Docker images for x64 and arm64. I have no problem with APM reporting when I run a container from the x64 image; this problem only happens with the arm64 Docker image.

I can work around this issue by installing the .NET Agent using one of the other installation methods, e.g. extracting from .tar.gz. In that case, my application reports transactions to APM correctly even when running on arm64.

I looked inside the NewRelic.Agent NuGet package, and I only see one copy of libNewRelicProfiler.so. It matches the one included in the installation package for linux-x64.

I didn't see any notes in the documentation indicating that the NewRelic.Agent NuGet package is intended to be specific to x64 usage or that another installation method is required for arm64 use cases.

Expected Behavior The agent reports transaction data to New Relic API and writes a log file

Troubleshooting or NR Diag results The agent did not produce a log file or write any text to the console.

Steps to Reproduce

  1. Install the NewRelic.Agent NuGet into an ASP.NET Core project: <PackageReference Include="NewRelic.Agent" Version="10.0.0" />
    • Do not install the New Relic .NET agent some other way
  2. Set the environment variables documented at https://docs.newrelic.com/docs/apm/agents/net-agent/installation/install-net-agent-linux/#enable-agent
  3. Build the ASP.NET Core application and run it on linux-arm64
  4. Produce load that would normally cause transactions to be reported to APM

Your Environment

  • .NET 6.0
  • NewRelic.Agent NuGet package version 10.0.0
  • ASP.NET Core
  • Amazon Linux 2
  • arm64 (AWS Graviton m6g.large instance type)
  • Running in a Docker container based on mcr.microsoft.com/dotnet/runtime-deps:6.0

I have these environment variables set the same way on x64 and arm64:

CORECLR_NEWRELIC_HOME=## REDACTED ##/newrelic
CORECLR_PROFILER_PATH=## REDACTED ##/newrelic/libNewRelicProfiler.so
CORECLR_ENABLE_PROFILING=1
CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
NEW_RELIC_APP_NAME=## REDACTED ##
NEW_RELIC_LICENSE_KEY=## REDACTED ##
NEW_RELIC_LABELS=## REDACTED ##

Additional context I'm not sure if these two issues might be a more specific use case of this same general problem:

  • #685
  • #686

RobinsonWM avatar Oct 10 '22 18:10 RobinsonWM

https://issues.newrelic.com/browse/NEWRELIC-4366

Jira CommentId: 95157 Commented by jcoleman:

Thanks for raising this issue! Adding the ARM agent to the nuget package should be relatively easy. I'll look at generating a test nuget package to get your feedback!

Work has been completed on this issue.

Hello @RobinsonWM,

Version 10.4.0 (as yet unreleased) of the Agent NuGet package will include the linux arm64 profiler. You should only need to modify the CORECLR_PROFILER_PATH environment variable to point at it (leave the other env vars the same). Ex:

CORECLR_PROFILER_PATH=## REDACTED ##/newrelic/linux-arm64/libNewRelicProfiler.so

JcolemanNR avatar Oct 28 '22 16:10 JcolemanNR

I tried out the 10.4.0 this morning and it's working great!

RobinsonWM avatar Dec 07 '22 14:12 RobinsonWM