Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Revert environment variable name change in installers and scripts #2852

Merged
merged 6 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/ArtifactBuilder/Artifacts/MsiInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class MsiInstaller : Artifact
private readonly string[] _coreIISRegistryValues = new string[] {
"CORECLR_ENABLE_PROFILING=1",
"CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}",
"CORECLR_NEW_RELIC_HOME=[NETAGENTCOMMONFOLDER]" };
"CORECLR_NEWRELIC_HOME=[NETAGENTCOMMONFOLDER]" };

private readonly AgentComponents _frameworkAgentComponents;
private readonly AgentComponents _coreAgentComponents;
Expand Down
2 changes: 1 addition & 1 deletion build/Linux/build/common/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# This script can be used to run a dotnet application with New Relic monitoring.

CORECLR_NEW_RELIC_HOME=${CORECLR_NEW_RELIC_HOME:-/usr/local/newrelic-dotnet-agent} CORECLR_ENABLE_PROFILING=1 CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} CORECLR_PROFILER_PATH=$CORECLR_NEW_RELIC_HOME/libNewRelicProfiler.so $@
NRHOME=${CORECLR_NEWRELIC_HOME:-${CORECLR_NEW_RELIC_HOME:-/usr/local/newrelic-dotnet-agent}} CORECLR_ENABLE_PROFILING=1 CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} CORECLR_PROFILER_PATH=$NRHOME/libNewRelicProfiler.so $@
tippmar-nr marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 5 additions & 3 deletions build/Linux/build/common/setenv.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

if [ -z "$CORECLR_NEW_RELIC_HOME" ]; then
echo "CORECLR_NEW_RELIC_HOME is undefined"
if [ -z "$CORECLR_NEWRELIC_HOME" ]; && [ -z "$CORECLR_NEW_RELIC_HOME" ]; then
echo "CORECLR_NEWRELIC_HOME is undefined"
else
NRHOME=${CORECLR_NEWRELIC_HOME:-${CORECLR_NEW_RELIC_HOME}}
tippmar-nr marked this conversation as resolved.
Show resolved Hide resolved

export CORECLR_ENABLE_PROFILING=1
export CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
export CORECLR_PROFILER_PATH=$CORECLR_NEW_RELIC_HOME/libNewRelicProfiler.so
export CORECLR_PROFILER_PATH=$NRHOME/libNewRelicProfiler.so
fi
4 changes: 2 additions & 2 deletions build/Linux/build/deb/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ fi
rm -f $NEWRELIC_HOME/extensions/NewRelic.Providers.Wrapper.Logging.Instrumentation.xml 2> /dev/null
rm -f $NEWRELIC_HOME/extensions/NewRelic.Providers.Wrapper.Logging.dll 2> /dev/null

echo "export CORECLR_NEW_RELIC_HOME=${NEWRELIC_HOME}" > /etc/profile.d/${PACKAGE_NAME}-path.sh
echo "export CORECLR_NEWRELIC_HOME=${NEWRELIC_HOME}" > /etc/profile.d/${PACKAGE_NAME}-path.sh
source /etc/profile.d/${PACKAGE_NAME}-path.sh

chmod o+w $NEWRELIC_HOME/logs
chmod +x $NEWRELIC_HOME/*.sh 2> /dev/null

printf "Initialize the New Relic .NET Agent environment variables by running:\n"
printf "\t\033[1msource /etc/profile.d/${PACKAGE_NAME}-path.sh\033[0m\n"
printf "\t\033[1msource $CORECLR_NEW_RELIC_HOME/setenv.sh\033[0m\n"
printf "\t\033[1msource $CORECLR_NEWRELIC_HOME/setenv.sh\033[0m\n"
4 changes: 2 additions & 2 deletions build/Linux/build/rpm/newrelic-dotnet-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ fi
rm -f $NEWRELIC_HOME/extensions/NewRelic.Providers.Wrapper.Logging.Instrumentation.xml 2> /dev/null
rm -f $NEWRELIC_HOME/extensions/NewRelic.Providers.Wrapper.Logging.dll 2> /dev/null

echo "export CORECLR_NEW_RELIC_HOME=${NEWRELIC_HOME}" > /etc/profile.d/%{name}-path.sh
echo "export CORECLR_NEWRELIC_HOME=${NEWRELIC_HOME}" > /etc/profile.d/%{name}-path.sh
source /etc/profile.d/%{name}-path.sh

chmod o+w $NEWRELIC_HOME/logs
chmod +x $NEWRELIC_HOME/*.sh 2> /dev/null

printf "Initialize the New Relic .NET Agent environment variables by running:\n"
printf "\t\033[1msource /etc/profile.d/%{name}-path.sh\033[0m\n"
printf "\t\033[1msource $CORECLR_NEW_RELIC_HOME/setenv.sh\033[0m\n"
printf "\t\033[1msource $CORECLR_NEWRELIC_HOME/setenv.sh\033[0m\n"
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<add name="COR_PROFILER_PATH" value="%HOME%\NewRelicAgent\Framework\NewRelic.Profiler.dll" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
<add name="COR_PROFILER_PATH_32" value="%HOME%\NewRelicAgent\Framework\x86\NewRelic.Profiler.dll" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
<add name="COR_PROFILER_PATH_64" value="%HOME%\NewRelicAgent\Framework\NewRelic.Profiler.dll" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
<add name="NEW_RELIC_HOME" value="%HOME%\NewRelicAgent\Framework" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
<add name="NEWRELIC_HOME" value="%HOME%\NewRelicAgent\Framework" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
<add name="CORECLR_ENABLE_PROFILING" value="1" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
<add name="CORECLR_PROFILER" value="{36032161-FFC0-4B61-B559-F6C5D41BAE5A}" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
<add name="CORECLR_PROFILER_PATH_32" value="%HOME%\NewRelicAgent\Core\x86\NewRelic.Profiler.dll" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
<add name="CORECLR_PROFILER_PATH_64" value="%HOME%\NewRelicAgent\Core\NewRelic.Profiler.dll" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
<add name="CORECLR_NEW_RELIC_HOME" value="%HOME%\NewRelicAgent\Core" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
<add name="CORECLR_NEWRELIC_HOME" value="%HOME%\NewRelicAgent\Core" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
<add name="NEW_RELIC_METADATA_AZURE_APP_SERVICE_NAME" value="%WEBSITE_SITE_NAME%" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
</environmentVariables>
</runtime>
Expand Down
4 changes: 2 additions & 2 deletions build/Packaging/AzureSiteExtension/Content/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ try

if ($env:NEWRELIC_LICENSEKEY -eq $null -and $env:NEW_RELIC_LICENSE_KEY -eq $null)
tippmar-nr marked this conversation as resolved.
Show resolved Hide resolved
{
WriteToInstallLog "The environment variable NEW_RELIC_LICENSE_KEY must be set. Please make sure to add it."
WriteToInstallLog "The environment variable NEWRELIC_LICENSE_KEY must be set. Please make sure to add it."
}

RemoveNewRelicInstallArtifacts "."
Expand All @@ -337,7 +337,7 @@ try
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_PROFILER']",
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_PROFILER_PATH_32']",
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_PROFILER_PATH_64']",
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_NEW_RELIC_HOME']")
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_NEWRELIC_HOME']")
$file = resolve-path(".\applicationHost.xdt")
RemoveXmlElements $file $xPaths
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,12 @@ function update_azure_service_definition([System.__ComObject] $project){

#Helps Azure Workers find the newrelic.config
$variableNHNode = $xml.CreateElement('Variable','http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition')
$variableNHNode.SetAttribute('name','NEW_RELIC_HOME')
$variableNHNode.SetAttribute('name','NEWRELIC_HOME')
$variableNHNode.SetAttribute('value','D:\ProgramData\New Relic\.NET Agent\')

#Helps Azure Workers find the NewRelic.Agent.Core.dll
$variableNIPNode = $xml.CreateElement('Variable','http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition')
$variableNIPNode.SetAttribute('name','NEW_RELIC_INSTALL_PATH')
$variableNIPNode.SetAttribute('name','NEWRELIC_INSTALL_PATH')
$variableNIPNode.SetAttribute('value','D:\Program Files\New Relic\.NET Agent\')

$runtimeEnvironmentNode.AppendChild($variableCEPNode)
Expand Down Expand Up @@ -390,7 +390,7 @@ function cleanup_azure_service_definition([System.__ComObject] $project){

$runtimeNode = $modified.Runtime
if($runtimeNode -ne $null -and $runtimeNode.ChildNodes.Count -gt 0){
$variableNodes = $runtimeNode.Environment.Variable | where { $_.name -eq "COR_ENABLE_PROFILING" -or $_.name -eq "COR_PROFILER" -or $_.name -eq "NEW_RELIC_HOME" -or $_.name -eq "NEW_RELIC_INSTALL_PATH" }
$variableNodes = $runtimeNode.Environment.Variable | where { $_.name -eq "COR_ENABLE_PROFILING" -or $_.name -eq "COR_PROFILER" -or $_.name -eq "NEW_RELIC_HOME" -or $_.name -eq "NEW_RELIC_INSTALL_PATH" -or $_.name -eq "NEWRELIC_HOME" -or $_.name -eq "NEWRELIC_INSTALL_PATH" }
tippmar-nr marked this conversation as resolved.
Show resolved Hide resolved
if($variableNodes -ne $null -and $variableNodes.Count -gt 0){
foreach($varNode in $variableNodes){
[Void]$varNode.ParentNode.RemoveChild($varNode)
Expand Down
4 changes: 2 additions & 2 deletions build/Packaging/NugetAzureWebSites-x64/tools/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ Write-Host "---------------------------------------"
Write-Host "COR_ENABLE_PROFILING 1"
Write-Host "COR_PROFILER {71DA0A04-7777-4EC6-9643-7D28B46A8A41}"
Write-Host "COR_PROFILER_PATH D:\Home\site\wwwroot\newrelic\NewRelic.Profiler.dll"
Write-Host "NEW_RELIC_HOME D:\Home\site\wwwroot\newrelic"
Write-Host "NEW_RELIC_LICENSE_KEY [REPLACE WITH YOUR LICENSE KEY]"
Write-Host "NEWRELIC_HOME D:\Home\site\wwwroot\newrelic"
Write-Host "NEWRELIC_LICENSE_KEY [REPLACE WITH YOUR LICENSE KEY]"
4 changes: 2 additions & 2 deletions build/Packaging/NugetAzureWebSites-x86/tools/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ Write-Host "---------------------------------------"
Write-Host "COR_ENABLE_PROFILING 1"
Write-Host "COR_PROFILER {71DA0A04-7777-4EC6-9643-7D28B46A8A41}"
Write-Host "COR_PROFILER_PATH D:\Home\site\wwwroot\newrelic\NewRelic.Profiler.dll"
Write-Host "NEW_RELIC_HOME D:\Home\site\wwwroot\newrelic"
Write-Host "NEW_RELIC_LICENSE_KEY [REPLACE WITH YOUR LICENSE KEY]"
Write-Host "NEWRELIC_HOME D:\Home\site\wwwroot\newrelic"
Write-Host "NEWRELIC_LICENSE_KEY [REPLACE WITH YOUR LICENSE KEY]"
8 changes: 4 additions & 4 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ You need to configure the following environment variables for the agent to attac

#### Environment variables for .NET Framework
```bash
NEW_RELIC_LICENSE_KEY=<your New Relic license key>
NEW_RELIC_HOME=path\to\home\directory
NEWRELIC_LICENSE_KEY=<your New Relic license key>
NEWRELIC_HOME=path\to\home\directory
COR_ENABLE_PROFILING=1
COR_PROFILER={71DA0A04-7777-4EC6-9643-7D28B46A8A41}
COR_PROFILER_PATH=path\to\home\directory\NewRelic.Profiler.dll
```

#### Environment variables for .NET Core
```bash
NEW_RELIC_LICENSE_KEY=<your New Relic license key>
CORECLR_NEW_RELIC_HOME=path\to\home\directory
NEWRELIC_LICENSE_KEY=<your New Relic license key>
CORECLR_NEWRELIC_HOME=path\to\home\directory
CORECLR_ENABLE_PROFILING=1
CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
CORECLR_PROFILER_PATH=path\to\home\directory\NewRelic.Profiler.dll
Expand Down
2 changes: 1 addition & 1 deletion src/Agent/Miscellaneous/azure-app-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ An example of this configuration inside a `.csproj` file looks something like:
CORECLR_ENABLE_PROFILING=1
CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
CORECLR_PROFILER_PATH=D:\Home\site\wwwroot\newrelic\NewRelic.Profiler.dll
CORECLR_NEW_RELIC_HOME=D:\Home\site\wwwroot\newrelic
CORECLR_NEWRELIC_HOME=D:\Home\site\wwwroot\newrelic
```
Note: environment variables for Azure App Services are set in the `Application settings` configuration page for your app, under `App settings`. You can verify the environment variables for your app by browsing to the `Environment` tab of your app's Kudu diagnostic console and then jumping to the `Environment Variables` section, e.g. `https://myappname.scm.azurewebsites.net/Env.cshtml#envVariables`

Expand Down
17 changes: 8 additions & 9 deletions src/Agent/MsiInstaller/Installer/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,7 @@ SPDX-License-Identifier: Apache-2.0
<!-- Global environment variables -->
<ComponentGroup Id="EnvironmentVariableComponents" Directory="TARGETDIR">
<Component Guid="{A54E9E06-E477-4D0F-8063-9BEDD6BC0B7B}">
<Environment Id="OldNewRelicInstallPathEnvironment" System="yes" Name="NEWRELIC_INSTALL_PATH" Action="remove" />
<Environment Id="NewRelicInstallPathEnvironment" System="yes" Name="NEW_RELIC_INSTALL_PATH" Value="[NETAGENTFOLDER]" Action="set" />
<Environment Id="NewRelicInstallPathEnvironment" System="yes" Name="NEWRELIC_INSTALL_PATH" Value="[NETAGENTFOLDER]" Action="set" />
<RegistryValue Root="HKLM" Key="Software\New Relic\.NET Agent" Name="NewRelicInstallPathEnvironmentInstalled" Type="integer" Value="1" KeyPath="yes" />
</Component>
</ComponentGroup>
Expand Down Expand Up @@ -798,7 +797,7 @@ SPDX-License-Identifier: Apache-2.0
</Component>
<Component Guid="{B63A32D5-33CC-4334-844C-B3B9E265B191}">
<Environment Id="OldCoreClrNewRelicHomeEnvironment" System="yes" Name="CORECLR_NEWRELIC_HOME" Action="remove" />
<Environment Id="CoreClrNewRelicHomeEnvironment" System="yes" Name="CORECLR_NEW_RELIC_HOME" Value="[NETAGENTCOMMONFOLDER]" Action="set" />
<Environment Id="CoreClrNewRelicHomeEnvironment" System="yes" Name="CORECLR_NEWRELIC_HOME" Value="[NETAGENTCOMMONFOLDER]" Action="set" />
<RegistryValue Root="HKLM" Key="Software\New Relic\.NET Core Agent" Name="CoreClrNewRelicHomeEnvironmentInstalled" Type="integer" Value="1" KeyPath="yes" />
</Component>
</ComponentGroup>
Expand All @@ -809,7 +808,7 @@ SPDX-License-Identifier: Apache-2.0
<RegistryValue Root="HKLM" Key="System\CurrentControlSet\Services\W3SVC" Name="Environment" Type="multiString" Action="append" KeyPath="yes">
<MultiStringValue Value="COR_ENABLE_PROFILING=1" />
<MultiStringValue Value="COR_PROFILER={71DA0A04-7777-4EC6-9643-7D28B46A8A41}" />
<MultiStringValue Value="NEW_RELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
<MultiStringValue Value="NEWRELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
<?ifdef IsWin64?>
<MultiStringValue Value="COR_PROFILER_PATH_32=[NETAGENT32ON64FOLDER]NewRelic.Profiler.dll" />
<?endif?>
Expand All @@ -819,7 +818,7 @@ SPDX-License-Identifier: Apache-2.0
<RegistryValue Root="HKLM" Key="System\CurrentControlSet\Services\WAS" Name="Environment" Type="multiString" Action="append" KeyPath="yes">
<MultiStringValue Value="COR_ENABLE_PROFILING=1" />
<MultiStringValue Value="COR_PROFILER={71DA0A04-7777-4EC6-9643-7D28B46A8A41}" />
<MultiStringValue Value="NEW_RELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
<MultiStringValue Value="NEWRELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
<?ifdef IsWin64?>
<MultiStringValue Value="COR_PROFILER_PATH_32=[NETAGENT32ON64FOLDER]NewRelic.Profiler.dll" />
<?endif?>
Expand All @@ -832,8 +831,8 @@ SPDX-License-Identifier: Apache-2.0
<RegistryValue Root="HKLM" Key="System\CurrentControlSet\Services\W3SVC" Name="Environment" Type="multiString" Action="append" KeyPath="yes">
<MultiStringValue Value="CORECLR_ENABLE_PROFILING=1" />
<MultiStringValue Value="CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}" />
<MultiStringValue Value="CORECLR_NEW_RELIC_HOME=[NETAGENTCOMMONFOLDER]" />
<MultiStringValue Value="NEW_RELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
<MultiStringValue Value="CORECLR_NEWRELIC_HOME=[NETAGENTCOMMONFOLDER]" />
<MultiStringValue Value="NEWRELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
<?ifdef IsWin64?>
<MultiStringValue Value="CORECLR_PROFILER_PATH_32=[NETAGENT32ON64FOLDER]NewRelic.Profiler.dll" />
<?endif?>
Expand All @@ -843,8 +842,8 @@ SPDX-License-Identifier: Apache-2.0
<RegistryValue Root="HKLM" Key="System\CurrentControlSet\Services\WAS" Name="Environment" Type="multiString" Action="append" KeyPath="yes">
<MultiStringValue Value="CORECLR_ENABLE_PROFILING=1" />
<MultiStringValue Value="CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}" />
<MultiStringValue Value="CORECLR_NEW_RELIC_HOME=[NETAGENTCOMMONFOLDER]" />
<MultiStringValue Value="NEW_RELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
<MultiStringValue Value="CORECLR_NEWRELIC_HOME=[NETAGENTCOMMONFOLDER]" />
<MultiStringValue Value="NEWRELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
<?ifdef IsWin64?>
<MultiStringValue Value="CORECLR_PROFILER_PATH_32=[NETAGENT32ON64FOLDER]NewRelic.Profiler.dll" />
<?endif?>
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/MsiInstaller/InstallerActions/CustomActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,9 @@ public ActionResult ValidateFilesAndFolders()
DeleteFile(@"C:\Program Files\New Relic\.NET Agent\netframework\Extensions\NewRelic.Providers.Wrapper.Asp35.dll");


String newrelicHomePath = Environment.GetEnvironmentVariable("NEW_RELIC_HOME");
String newrelicHomePath = Environment.GetEnvironmentVariable("NEWRELIC_HOME");
if (newrelicHomePath != null) DeleteFile(newrelicHomePath + @"\newrelic.xml");
newrelicHomePath = Environment.GetEnvironmentVariable("NEW_RELIC_HOME");
if (newrelicHomePath != null) DeleteFile(newrelicHomePath + @"\newrelic.xml");

return ActionResult.Success;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ You should use `AgentWrapperApi.HandleWrapperException` to deal with exceptions

## Notes on dynamic wrapper assembly loading ##

Wrapper assemblies are loaded dynamically at agent startup. All assemblies found in **[NEW_RELIC_HOME]/Extensions** will be loaded, and all `IWrapper`s found in the assembly will be instantiated and passed to the `WrapperService` (contained inside a `LazyMap`).
Wrapper assemblies are loaded dynamically at agent startup. All assemblies found in **[NEWRELIC_HOME]/Extensions** will be loaded, and all `IWrapper`s found in the assembly will be instantiated and passed to the `WrapperService` (contained inside a `LazyMap`).

When an instrumented method is hit, `WrapperService` will ask the `LazyMap` for an appropriate `IWrapper`. The map will return the first wrapper it finds that returns **true** from `IWrapper.CanWrap`, or null if they all return **false**. The resulting wrapper (or null) will be cached in the map which is keyed on the fully qualified method signature. If the wrapper loader returns null, the agent will fall back to using tracers.

Expand Down
2 changes: 1 addition & 1 deletion src/Agent/NewRelic/Profiler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ When instrumentation in the `extensions` directory changes on disk, the profiler

The Microsoft defined environment variables like `COR_ENABLE_PROFILING` and `COR_PROFILER_PATH` used to attach the profiler to a process. On CoreCLR all of those environment variables are prefixed with `CORECLR` instead of `COR`, ie `CORECLR_ENABLE_PROFILING`.

After the profiler attaches it uses custom environment variables to determine the path to `NewRelic.Agent.Core.dll`. It tries to find the dll in the path specified by `NEW_RELIC_INSTALL_PATH`, or if that is undefined then `NEW_RELIC_HOME`. On CoreCLR, those environment variables are prefixed with `CORECLR_` so that the agent does not try to use the .NET Framework managed agent in a CoreCLR process.
After the profiler attaches it uses custom environment variables to determine the path to `NewRelic.Agent.Core.dll`. It tries to find the dll in the path specified by `NEWRELIC_INSTALL_PATH`, or if that is undefined then `NEWRELIC_HOME`. On CoreCLR, those environment variables are prefixed with `CORECLR_` so that the agent does not try to use the .NET Framework managed agent in a CoreCLR process.

## FAQ

Expand Down
Loading