Monitoring multiple .NET Core applications on the same server is fully supported.
There should never be a need to have multiple instances of the agent installed on the host, so the
CORECLR_NEWRELIC_HOME variable values should be the same system-wide. You should only need one instance of those variables.
There are quite a few ways to configure the application name, so how you do it is a matter of what works best for you and how your application is structured.
What many people do is set the application name (or maybe even all of the environment variables) as an environment variable that gets loaded into the application process itself at runtime. This avoids the need to name the application in the
If you are using the AspNETCoreModule to configure IIS as a reverse proxy, you can also set the environment variables in the application’s web.config file.
You can even set environment variables directly in the command-line command you use to launch the application.
Basically, you’re looking for a way to get the environment variables you need into the application process itself, since that is ultimately what the agent will use. Each application you’re monitoring will have its own instance of the agent loaded into the process with it, and the variables that are present in the process are the ones that the agent sees. This is what we mean by setting the variables on an app-by-app basis.
We do have a feature request in place for loading the application name from the appsettings.json file and I’ll be happy to add your name to it.
For now, I think your best bet is to load the
NEW_RELIC_APP_NAME environment variable directly into the application process.
Hope this helps,