Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Can not setup agent with .net core app


#1

Hello,

I am trying to integrate .net core agent with no luck. I followed the documented guide for both my local machine (win10) and in docker (linux container in virtualbox vm). In both setups no data did send to apm.

The basic steps I made for windows local run are:

  • set the env params at launchSettings.json
    {
    “profiles”: {
    “WebApplication1”: {
    “commandName”: “Project”,
    “launchBrowser”: true,
    “environmentVariables”: {
    “ASPNETCORE_ENVIRONMENT”: “Development”,
    “CORECLR_NEWRELIC_HOME”: “C:\newrelic-netcore-agent”,
    “CORECLR_ENABLE_PROFILING”: “1”,
    “CORECLR_PROFILER”: “{36032161-FFC0-4B61-B559-F6C5D41BAE5A}”,
    “CORECLR_PROFILER_PATH”: “C:\newrelic-netcore-agent\NewRelic.Profiler.dll”,
    “NEW_RELIC_APP_NAME”: “testproject”
    “NEW_RELIC_LICENSE_KEY”: “[myKey]”,
    },
    “applicationUrl”: “http://localhost:5000
    }
    }
    }
  • set permissions of C:\newrelic-netcore-agent and all children to “everyone”
  • stop my firewall
  • made a few hits to my api
  • wait several minutes
  • refresh apm dashboard

Following this https://discuss.newrelic.com/t/relic-solution-net-core-agent-installation-issues-a-troubleshooting-guide/54492

Is the application supported by the .NET Core agent?

  • the app is .net core 2.1

Is the correct build of the agent present on the system?

  • the NewRelic.Profiler.dll is placed at C:\newrelic-netcore-agent\NewRelic.Profiler.dll
  • process explorer not load NewRelic.Profiler.dll

Are the environment variables being set correctly?

  • set:
    CORECLR_NEWRELIC_HOME=C:\newrelic-netcore-agent
    CORECLR_ENABLE_PROFILING=1
    CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
    CORECLR_PROFILER_PATH=C:\newrelic-netcore-agent\NewRelic.Profiler.dll
    NEW_RELIC_APP_NAME=testproject
    NEW_RELIC_LICENSE_KEY=[myKey]
  • verify through process explorer

Does the application have the correct permissions to access the agent folder and write to the logs folder?

  • set everyone permissions

#2

Hi @george16, i’m not seeing any applications in APM at the moment, you need to follow the steps in the APM UI to add the application with name testproject for it to report to. :slight_smile:


#3

Hello @george16,

Do you see any New Relic logs and are there any errors in those logs?

Can you verify whether your application is 32-bit or 64-bit and confirm that the correct agent bitness for your environment was installed?

Have you tried using Process Monitor to check if the profiler is being accessed by the process? Process Monitor could also tell you if there was an error accessing the profiler.

Let me know if that helps.