Skip to content

Commit e77683b

Browse files
authored
fix: Revert environment variable name change in installers and scripts (#2852)
1 parent 936b6f6 commit e77683b

File tree

16 files changed

+40
-37
lines changed

16 files changed

+40
-37
lines changed

build/ArtifactBuilder/Artifacts/MsiInstaller.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class MsiInstaller : Artifact
1717
private readonly string[] _coreIISRegistryValues = new string[] {
1818
"CORECLR_ENABLE_PROFILING=1",
1919
"CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}",
20-
"CORECLR_NEW_RELIC_HOME=[NETAGENTCOMMONFOLDER]" };
20+
"CORECLR_NEWRELIC_HOME=[NETAGENTCOMMONFOLDER]" };
2121

2222
private readonly AgentComponents _frameworkAgentComponents;
2323
private readonly AgentComponents _coreAgentComponents;

build/Linux/build/common/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

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

5-
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 $@
5+
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 $@

build/Linux/build/common/setenv.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/bash
22

3-
if [ -z "$CORECLR_NEW_RELIC_HOME" ]; then
4-
echo "CORECLR_NEW_RELIC_HOME is undefined"
3+
if [ -z "$CORECLR_NEWRELIC_HOME" ]; && [ -z "$CORECLR_NEW_RELIC_HOME" ]; then
4+
echo "CORECLR_NEWRELIC_HOME is undefined"
55
else
6+
NRHOME=${CORECLR_NEWRELIC_HOME:-${CORECLR_NEW_RELIC_HOME}}
7+
68
export CORECLR_ENABLE_PROFILING=1
79
export CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
8-
export CORECLR_PROFILER_PATH=$CORECLR_NEW_RELIC_HOME/libNewRelicProfiler.so
10+
export CORECLR_PROFILER_PATH=$NRHOME/libNewRelicProfiler.so
911
fi

build/Linux/build/deb/postinst

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ fi
4545
rm -f $NEWRELIC_HOME/extensions/NewRelic.Providers.Wrapper.Logging.Instrumentation.xml 2> /dev/null
4646
rm -f $NEWRELIC_HOME/extensions/NewRelic.Providers.Wrapper.Logging.dll 2> /dev/null
4747

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

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

5454
printf "Initialize the New Relic .NET Agent environment variables by running:\n"
5555
printf "\t\033[1msource /etc/profile.d/${PACKAGE_NAME}-path.sh\033[0m\n"
56-
printf "\t\033[1msource $CORECLR_NEW_RELIC_HOME/setenv.sh\033[0m\n"
56+
printf "\t\033[1msource $CORECLR_NEWRELIC_HOME/setenv.sh\033[0m\n"

build/Linux/build/rpm/newrelic-dotnet-agent.spec

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ fi
8888
rm -f $NEWRELIC_HOME/extensions/NewRelic.Providers.Wrapper.Logging.Instrumentation.xml 2> /dev/null
8989
rm -f $NEWRELIC_HOME/extensions/NewRelic.Providers.Wrapper.Logging.dll 2> /dev/null
9090

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

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

9797
printf "Initialize the New Relic .NET Agent environment variables by running:\n"
9898
printf "\t\033[1msource /etc/profile.d/%{name}-path.sh\033[0m\n"
99-
printf "\t\033[1msource $CORECLR_NEW_RELIC_HOME/setenv.sh\033[0m\n"
99+
printf "\t\033[1msource $CORECLR_NEWRELIC_HOME/setenv.sh\033[0m\n"

build/Packaging/AzureSiteExtension/Content/applicationHost.xdt

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<add name="COR_PROFILER_PATH" value="%HOME%\NewRelicAgent\Framework\NewRelic.Profiler.dll" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
99
<add name="COR_PROFILER_PATH_32" value="%HOME%\NewRelicAgent\Framework\x86\NewRelic.Profiler.dll" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
1010
<add name="COR_PROFILER_PATH_64" value="%HOME%\NewRelicAgent\Framework\NewRelic.Profiler.dll" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
11-
<add name="NEW_RELIC_HOME" value="%HOME%\NewRelicAgent\Framework" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
11+
<add name="NEWRELIC_HOME" value="%HOME%\NewRelicAgent\Framework" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
1212
<add name="CORECLR_ENABLE_PROFILING" value="1" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
1313
<add name="CORECLR_PROFILER" value="{36032161-FFC0-4B61-B559-F6C5D41BAE5A}" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
1414
<add name="CORECLR_PROFILER_PATH_32" value="%HOME%\NewRelicAgent\Core\x86\NewRelic.Profiler.dll" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
1515
<add name="CORECLR_PROFILER_PATH_64" value="%HOME%\NewRelicAgent\Core\NewRelic.Profiler.dll" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
16-
<add name="CORECLR_NEW_RELIC_HOME" value="%HOME%\NewRelicAgent\Core" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
16+
<add name="CORECLR_NEWRELIC_HOME" value="%HOME%\NewRelicAgent\Core" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
1717
<add name="NEW_RELIC_METADATA_AZURE_APP_SERVICE_NAME" value="%WEBSITE_SITE_NAME%" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
1818
</environmentVariables>
1919
</runtime>

build/Packaging/AzureSiteExtension/Content/install.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ try
320320

321321
if ($env:NEWRELIC_LICENSEKEY -eq $null -and $env:NEW_RELIC_LICENSE_KEY -eq $null)
322322
{
323-
WriteToInstallLog "The environment variable NEW_RELIC_LICENSE_KEY must be set. Please make sure to add it."
323+
WriteToInstallLog "The environment variable NEWRELIC_LICENSE_KEY must be set. Please make sure to add it."
324324
}
325325

326326
RemoveNewRelicInstallArtifacts "."
@@ -337,7 +337,7 @@ try
337337
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_PROFILER']",
338338
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_PROFILER_PATH_32']",
339339
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_PROFILER_PATH_64']",
340-
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_NEW_RELIC_HOME']")
340+
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_NEWRELIC_HOME']")
341341
$file = resolve-path(".\applicationHost.xdt")
342342
RemoveXmlElements $file $xPaths
343343
}

build/Packaging/NugetAzureCloudServices/tools/NewRelicHelper.psm1

+3-3
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,12 @@ function update_azure_service_definition([System.__ComObject] $project){
244244

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

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

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

391391
$runtimeNode = $modified.Runtime
392392
if($runtimeNode -ne $null -and $runtimeNode.ChildNodes.Count -gt 0){
393-
$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" }
393+
$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" }
394394
if($variableNodes -ne $null -and $variableNodes.Count -gt 0){
395395
foreach($varNode in $variableNodes){
396396
[Void]$varNode.ParentNode.RemoveChild($varNode)

build/Packaging/NugetAzureWebSites-x64/tools/install.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ Write-Host "---------------------------------------"
2727
Write-Host "COR_ENABLE_PROFILING 1"
2828
Write-Host "COR_PROFILER {71DA0A04-7777-4EC6-9643-7D28B46A8A41}"
2929
Write-Host "COR_PROFILER_PATH D:\Home\site\wwwroot\newrelic\NewRelic.Profiler.dll"
30-
Write-Host "NEW_RELIC_HOME D:\Home\site\wwwroot\newrelic"
31-
Write-Host "NEW_RELIC_LICENSE_KEY [REPLACE WITH YOUR LICENSE KEY]"
30+
Write-Host "NEWRELIC_HOME D:\Home\site\wwwroot\newrelic"
31+
Write-Host "NEWRELIC_LICENSE_KEY [REPLACE WITH YOUR LICENSE KEY]"

build/Packaging/NugetAzureWebSites-x86/tools/install.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ Write-Host "---------------------------------------"
2727
Write-Host "COR_ENABLE_PROFILING 1"
2828
Write-Host "COR_PROFILER {71DA0A04-7777-4EC6-9643-7D28B46A8A41}"
2929
Write-Host "COR_PROFILER_PATH D:\Home\site\wwwroot\newrelic\NewRelic.Profiler.dll"
30-
Write-Host "NEW_RELIC_HOME D:\Home\site\wwwroot\newrelic"
31-
Write-Host "NEW_RELIC_LICENSE_KEY [REPLACE WITH YOUR LICENSE KEY]"
30+
Write-Host "NEWRELIC_HOME D:\Home\site\wwwroot\newrelic"
31+
Write-Host "NEWRELIC_LICENSE_KEY [REPLACE WITH YOUR LICENSE KEY]"

docs/development.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ You need to configure the following environment variables for the agent to attac
3333

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

4343
#### Environment variables for .NET Core
4444
```bash
45-
NEW_RELIC_LICENSE_KEY=<your New Relic license key>
46-
CORECLR_NEW_RELIC_HOME=path\to\home\directory
45+
NEWRELIC_LICENSE_KEY=<your New Relic license key>
46+
CORECLR_NEWRELIC_HOME=path\to\home\directory
4747
CORECLR_ENABLE_PROFILING=1
4848
CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
4949
CORECLR_PROFILER_PATH=path\to\home\directory\NewRelic.Profiler.dll

src/Agent/Miscellaneous/azure-app-services.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ An example of this configuration inside a `.csproj` file looks something like:
2929
CORECLR_ENABLE_PROFILING=1
3030
CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
3131
CORECLR_PROFILER_PATH=D:\Home\site\wwwroot\newrelic\NewRelic.Profiler.dll
32-
CORECLR_NEW_RELIC_HOME=D:\Home\site\wwwroot\newrelic
32+
CORECLR_NEWRELIC_HOME=D:\Home\site\wwwroot\newrelic
3333
```
3434
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`
3535

src/Agent/MsiInstaller/Installer/Product.wxs

+8-9
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,7 @@ SPDX-License-Identifier: Apache-2.0
761761
<!-- Global environment variables -->
762762
<ComponentGroup Id="EnvironmentVariableComponents" Directory="TARGETDIR">
763763
<Component Guid="{A54E9E06-E477-4D0F-8063-9BEDD6BC0B7B}">
764-
<Environment Id="OldNewRelicInstallPathEnvironment" System="yes" Name="NEWRELIC_INSTALL_PATH" Action="remove" />
765-
<Environment Id="NewRelicInstallPathEnvironment" System="yes" Name="NEW_RELIC_INSTALL_PATH" Value="[NETAGENTFOLDER]" Action="set" />
764+
<Environment Id="NewRelicInstallPathEnvironment" System="yes" Name="NEWRELIC_INSTALL_PATH" Value="[NETAGENTFOLDER]" Action="set" />
766765
<RegistryValue Root="HKLM" Key="Software\New Relic\.NET Agent" Name="NewRelicInstallPathEnvironmentInstalled" Type="integer" Value="1" KeyPath="yes" />
767766
</Component>
768767
</ComponentGroup>
@@ -798,7 +797,7 @@ SPDX-License-Identifier: Apache-2.0
798797
</Component>
799798
<Component Guid="{B63A32D5-33CC-4334-844C-B3B9E265B191}">
800799
<Environment Id="OldCoreClrNewRelicHomeEnvironment" System="yes" Name="CORECLR_NEWRELIC_HOME" Action="remove" />
801-
<Environment Id="CoreClrNewRelicHomeEnvironment" System="yes" Name="CORECLR_NEW_RELIC_HOME" Value="[NETAGENTCOMMONFOLDER]" Action="set" />
800+
<Environment Id="CoreClrNewRelicHomeEnvironment" System="yes" Name="CORECLR_NEWRELIC_HOME" Value="[NETAGENTCOMMONFOLDER]" Action="set" />
802801
<RegistryValue Root="HKLM" Key="Software\New Relic\.NET Core Agent" Name="CoreClrNewRelicHomeEnvironmentInstalled" Type="integer" Value="1" KeyPath="yes" />
803802
</Component>
804803
</ComponentGroup>
@@ -809,7 +808,7 @@ SPDX-License-Identifier: Apache-2.0
809808
<RegistryValue Root="HKLM" Key="System\CurrentControlSet\Services\W3SVC" Name="Environment" Type="multiString" Action="append" KeyPath="yes">
810809
<MultiStringValue Value="COR_ENABLE_PROFILING=1" />
811810
<MultiStringValue Value="COR_PROFILER={71DA0A04-7777-4EC6-9643-7D28B46A8A41}" />
812-
<MultiStringValue Value="NEW_RELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
811+
<MultiStringValue Value="NEWRELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
813812
<?ifdef IsWin64?>
814813
<MultiStringValue Value="COR_PROFILER_PATH_32=[NETAGENT32ON64FOLDER]NewRelic.Profiler.dll" />
815814
<?endif?>
@@ -819,7 +818,7 @@ SPDX-License-Identifier: Apache-2.0
819818
<RegistryValue Root="HKLM" Key="System\CurrentControlSet\Services\WAS" Name="Environment" Type="multiString" Action="append" KeyPath="yes">
820819
<MultiStringValue Value="COR_ENABLE_PROFILING=1" />
821820
<MultiStringValue Value="COR_PROFILER={71DA0A04-7777-4EC6-9643-7D28B46A8A41}" />
822-
<MultiStringValue Value="NEW_RELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
821+
<MultiStringValue Value="NEWRELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
823822
<?ifdef IsWin64?>
824823
<MultiStringValue Value="COR_PROFILER_PATH_32=[NETAGENT32ON64FOLDER]NewRelic.Profiler.dll" />
825824
<?endif?>
@@ -832,8 +831,8 @@ SPDX-License-Identifier: Apache-2.0
832831
<RegistryValue Root="HKLM" Key="System\CurrentControlSet\Services\W3SVC" Name="Environment" Type="multiString" Action="append" KeyPath="yes">
833832
<MultiStringValue Value="CORECLR_ENABLE_PROFILING=1" />
834833
<MultiStringValue Value="CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}" />
835-
<MultiStringValue Value="CORECLR_NEW_RELIC_HOME=[NETAGENTCOMMONFOLDER]" />
836-
<MultiStringValue Value="NEW_RELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
834+
<MultiStringValue Value="CORECLR_NEWRELIC_HOME=[NETAGENTCOMMONFOLDER]" />
835+
<MultiStringValue Value="NEWRELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
837836
<?ifdef IsWin64?>
838837
<MultiStringValue Value="CORECLR_PROFILER_PATH_32=[NETAGENT32ON64FOLDER]NewRelic.Profiler.dll" />
839838
<?endif?>
@@ -843,8 +842,8 @@ SPDX-License-Identifier: Apache-2.0
843842
<RegistryValue Root="HKLM" Key="System\CurrentControlSet\Services\WAS" Name="Environment" Type="multiString" Action="append" KeyPath="yes">
844843
<MultiStringValue Value="CORECLR_ENABLE_PROFILING=1" />
845844
<MultiStringValue Value="CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}" />
846-
<MultiStringValue Value="CORECLR_NEW_RELIC_HOME=[NETAGENTCOMMONFOLDER]" />
847-
<MultiStringValue Value="NEW_RELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
845+
<MultiStringValue Value="CORECLR_NEWRELIC_HOME=[NETAGENTCOMMONFOLDER]" />
846+
<MultiStringValue Value="NEWRELIC_INSTALL_PATH=[NETAGENTFOLDER]" />
848847
<?ifdef IsWin64?>
849848
<MultiStringValue Value="CORECLR_PROFILER_PATH_32=[NETAGENT32ON64FOLDER]NewRelic.Profiler.dll" />
850849
<?endif?>

src/Agent/MsiInstaller/InstallerActions/CustomActions.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,9 @@ public ActionResult ValidateFilesAndFolders()
444444
DeleteFile(@"C:\Program Files\New Relic\.NET Agent\netframework\Extensions\NewRelic.Providers.Wrapper.Asp35.dll");
445445

446446

447-
String newrelicHomePath = Environment.GetEnvironmentVariable("NEW_RELIC_HOME");
447+
String newrelicHomePath = Environment.GetEnvironmentVariable("NEWRELIC_HOME");
448+
if (newrelicHomePath != null) DeleteFile(newrelicHomePath + @"\newrelic.xml");
449+
newrelicHomePath = Environment.GetEnvironmentVariable("NEW_RELIC_HOME");
448450
if (newrelicHomePath != null) DeleteFile(newrelicHomePath + @"\newrelic.xml");
449451

450452
return ActionResult.Success;

src/Agent/NewRelic/Agent/Extensions/Providers/Wrapper/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ You should use `AgentWrapperApi.HandleWrapperException` to deal with exceptions
204204

205205
## Notes on dynamic wrapper assembly loading ##
206206

207-
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`).
207+
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`).
208208

209209
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.
210210

src/Agent/NewRelic/Profiler/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ When instrumentation in the `extensions` directory changes on disk, the profiler
9797

9898
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`.
9999

100-
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.
100+
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.
101101

102102
## FAQ
103103

0 commit comments

Comments
 (0)