Skip to content

Commit b00edda

Browse files
authored
summary: Environment variable naming consistency (#2812)
feat: Implement consistent naming scheme for all environment variables. All environment variables starting with (or containing) `NEWRELIC_` are now named `NEW_RELIC_`. Support for previous environment variables is retained, so this is not a breaking change. (#718) (#2812) notice: Environment variables that start with or contain `NEWRELIC_` are deprecated and may be removed in a future major release. Users are encouraged to update their installation to use `NEW_RELIC_` names as soon as possible.
1 parent 25a9d30 commit b00edda

File tree

68 files changed

+830
-423
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+830
-423
lines changed

.github/workflows/build_profiler.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139

140140
env:
141141
profiler_path: ${{ github.workspace }}/src/Agent/NewRelic/Profiler
142-
CORECLR_NEWRELIC_HOME: ${{ github.workspace }}/src/Agent/NewRelic/newrelichome_x64_coreclr_linux # not used but required by Profiler/docker-compose.yml
142+
CORECLR_NEW_RELIC_HOME: ${{ github.workspace }}/src/Agent/NewRelic/newrelichome_x64_coreclr_linux # not used but required by Profiler/docker-compose.yml
143143

144144
steps:
145145
# intentionally disabled for this job, when enabled it causes a failure in the Build Linux Profiler step

.github/workflows/nuget_slack_notifications.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
DOTTY_WEBHOOK: ${{ secrets.SLACK_NUGET_NOTIFICATIONS_WEBHOOK }}
6363
DOTTY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6464
CORECLR_ENABLE_PROFILING: 1
65-
CORECLR_NEWRELIC_HOME: ${{ env.scan-tool-publish-path }}/newrelic
65+
CORECLR_NEW_RELIC_HOME: ${{ env.scan-tool-publish-path }}/newrelic
6666
CORECLR_PROFILER: "{36032161-FFC0-4B61-B559-F6C5D41BAE5A}"
6767
CORECLR_PROFILER_PATH: ${{ env.scan-tool-publish-path }}/newrelic/libNewRelicProfiler.so
6868
NEW_RELIC_APP_NAME: Dotty

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_NEWRELIC_HOME=[NETAGENTCOMMONFOLDER]" };
20+
"CORECLR_NEW_RELIC_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_NEWRELIC_HOME=${CORECLR_NEWRELIC_HOME:-/usr/local/newrelic-dotnet-agent} CORECLR_ENABLE_PROFILING=1 CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} CORECLR_PROFILER_PATH=$CORECLR_NEWRELIC_HOME/libNewRelicProfiler.so $@
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 $@

build/Linux/build/common/setenv.sh

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

3-
if [ -z "$CORECLR_NEWRELIC_HOME" ]; then
4-
echo "CORECLR_NEWRELIC_HOME is undefined"
3+
if [ -z "$CORECLR_NEW_RELIC_HOME" ]; then
4+
echo "CORECLR_NEW_RELIC_HOME is undefined"
55
else
66
export CORECLR_ENABLE_PROFILING=1
77
export CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
8-
export CORECLR_PROFILER_PATH=$CORECLR_NEWRELIC_HOME/libNewRelicProfiler.so
8+
export CORECLR_PROFILER_PATH=$CORECLR_NEW_RELIC_HOME/libNewRelicProfiler.so
99
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_NEWRELIC_HOME=${NEWRELIC_HOME}" > /etc/profile.d/${PACKAGE_NAME}-path.sh
48+
echo "export CORECLR_NEW_RELIC_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_NEWRELIC_HOME/setenv.sh\033[0m\n"
56+
printf "\t\033[1msource $CORECLR_NEW_RELIC_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_NEWRELIC_HOME=${NEWRELIC_HOME}" > /etc/profile.d/%{name}-path.sh
91+
echo "export CORECLR_NEW_RELIC_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_NEWRELIC_HOME/setenv.sh\033[0m\n"
99+
printf "\t\033[1msource $CORECLR_NEW_RELIC_HOME/setenv.sh\033[0m\n"

build/Linux/test/scripts/custom_xml_test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ install_agent
99
verify_no_logs
1010

1111
dos2unix Instrumentation.xml &>/dev/null
12-
cp Instrumentation.xml $CORECLR_NEWRELIC_HOME/extensions/
12+
cp Instrumentation.xml $CORECLR_NEW_RELIC_HOME/extensions/
1313
CORECLR_ENABLE_PROFILING=0 dotnet build
1414
dotnet bin/Debug/net6.0/custom_xml.dll
1515

build/Linux/test/scripts/http_client_test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ dos2unix /test/util.sh &>/dev/null && source /test/util.sh
55
print_header "HTTP Client Test"
66

77
install_agent_no_env
8-
CORECLR_NEWRELIC_HOME=/usr/local/${PACKAGE_NAME}/
8+
CORECLR_NEW_RELIC_HOME=/usr/local/${PACKAGE_NAME}/
99

1010
verify_no_logs
1111

12-
$CORECLR_NEWRELIC_HOME/run.sh dotnet run
12+
$CORECLR_NEW_RELIC_HOME/run.sh dotnet run
1313

1414
verify_logs_exist
1515

build/Linux/test/scripts/http_client_test_tarball.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ install_tarball "/custom/install/path"
88

99
verify_no_logs
1010

11-
$CORECLR_NEWRELIC_HOME/run.sh dotnet run
11+
$CORECLR_NEW_RELIC_HOME/run.sh dotnet run
1212

1313
verify_logs_exist
1414

build/Linux/test/scripts/util.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ function install_tarball {
7171
IS "$latest_tarball" =~ tar
7272
tar xvfz "$latest_tarball"
7373
popd
74-
export CORECLR_NEWRELIC_HOME="${install_path}/${PACKAGE_NAME}"
75-
echo "install_tarball CORECLR_NEWRELIC_HOME=${CORECLR_NEWRELIC_HOME}"
74+
export CORECLR_NEW_RELIC_HOME="${install_path}/${PACKAGE_NAME}"
75+
echo "install_tarball CORECLR_NEW_RELIC_HOME=${CORECLR_NEW_RELIC_HOME}"
7676
source "${install_path}/${PACKAGE_NAME}/setenv.sh"
7777
}
7878

@@ -129,7 +129,7 @@ function bad {
129129
}
130130

131131
function verify_no_logs {
132-
log_dir="${CORECLR_NEWRELIC_HOME}/logs"
132+
log_dir="${CORECLR_NEW_RELIC_HOME}/logs"
133133
log_file_count=$(ls -A1 "$log_dir" |wc -l)
134134
IS "$log_file_count" == 0
135135
if [[ "$log_file_count" -gt 0 ]]; then
@@ -140,7 +140,7 @@ function verify_no_logs {
140140
}
141141

142142
function verify_logs_exist {
143-
log_dir="${CORECLR_NEWRELIC_HOME}/logs"
143+
log_dir="${CORECLR_NEW_RELIC_HOME}/logs"
144144
log_file_count=$(ls -A1 "$log_dir" |wc -l)
145145
IS "$log_file_count" != 0
146146
if [[ "$log_file_count" -gt 0 ]]; then
@@ -152,7 +152,7 @@ function verify_logs_exist {
152152

153153
function verify_agent_log_exists {
154154
app_name="$1"
155-
logfile_name="$CORECLR_NEWRELIC_HOME/logs/newrelic_agent_${app_name}.log"
155+
logfile_name="$CORECLR_NEW_RELIC_HOME/logs/newrelic_agent_${app_name}.log"
156156
OK -e "$logfile_name"
157157
if [[ -e "$logfile_name" ]]; then
158158
good "Verified agent log file $logfile_name was created"
@@ -162,7 +162,7 @@ function verify_agent_log_exists {
162162
}
163163

164164
function verify_agent_log_grep {
165-
count=$(grep "$1" ${CORECLR_NEWRELIC_HOME}/logs/* |wc -l)
165+
count=$(grep "$1" ${CORECLR_NEW_RELIC_HOME}/logs/* |wc -l)
166166
IS "$count" != 0
167167
if [[ "$count" -gt 0 ]]; then
168168
good "$1 was in the log files"

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="NEWRELIC_HOME" value="%HOME%\NewRelicAgent\Framework" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing"/>
11+
<add name="NEW_RELIC_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_NEWRELIC_HOME" value="%HOME%\NewRelicAgent\Core" 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"/>
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

+17-3
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,26 @@ try
278278
$is35App = CheckIfAppIs35
279279
$agentVersion = ""
280280

281-
if ($env:NEWRELIC_AGENT_VERSION_OVERRIDE -ne $null)
281+
if ($env:NEW_RELIC_AGENT_VERSION_OVERRIDE -ne $null)
282+
{
283+
try
284+
{
285+
$version = [System.Version]$env:NEW_RELIC_AGENT_VERSION_OVERRIDE.ToString()
286+
$agentVersion = $version.ToString()
287+
}
288+
catch
289+
{
290+
WriteToInstallLog "NEW_RELIC_AGENT_VERSION_OVERRIDE environment variable has an incorrect Agent version number. Failed to install."
291+
exit 1
292+
}
293+
}
294+
elseif ($env:NEWRELIC_AGENT_VERSION_OVERRIDE -ne $null) # check for deprecated environment variable
282295
{
283296
try
284297
{
285298
$version = [System.Version]$env:NEWRELIC_AGENT_VERSION_OVERRIDE.ToString()
286299
$agentVersion = $version.ToString()
300+
WriteToInstallLog "NEWRELIC_AGENT_VERSION_OVERRIDE environment variable is deprecated and may be removed in a future release. Please use NEW_RELIC_AGENT_VERSION_OVERRIDE instead."
287301
}
288302
catch
289303
{
@@ -306,7 +320,7 @@ try
306320

307321
if ($env:NEWRELIC_LICENSEKEY -eq $null -and $env:NEW_RELIC_LICENSE_KEY -eq $null)
308322
{
309-
WriteToInstallLog "The environment variable NEWRELIC_LICENSEKEY or NEW_RELIC_LICENSE_KEY must be set. Please make sure to add one."
323+
WriteToInstallLog "The environment variable NEW_RELIC_LICENSE_KEY must be set. Please make sure to add it."
310324
}
311325

312326
RemoveNewRelicInstallArtifacts "."
@@ -323,7 +337,7 @@ try
323337
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_PROFILER']",
324338
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_PROFILER_PATH_32']",
325339
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_PROFILER_PATH_64']",
326-
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_NEWRELIC_HOME']")
340+
"/configuration/system.webServer/runtime/environmentVariables/add[@name='CORECLR_NEW_RELIC_HOME']")
327341
$file = resolve-path(".\applicationHost.xdt")
328342
RemoveXmlElements $file $xPaths
329343
}

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','NEWRELIC_HOME')
247+
$variableNHNode.SetAttribute('name','NEW_RELIC_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','NEWRELIC_INSTALL_PATH')
252+
$variableNIPNode.SetAttribute('name','NEW_RELIC_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 "NEWRELIC_HOME" -or $_.name -eq "NEWRELIC_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" }
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 "NEWRELIC_HOME D:\Home\site\wwwroot\newrelic"
31-
Write-Host "NEWRELIC_LICENSEKEY [REPLACE WITH YOUR LICENSE KEY]"
30+
Write-Host "NEW_RELIC_HOME D:\Home\site\wwwroot\newrelic"
31+
Write-Host "NEW_RELIC_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 "NEWRELIC_HOME D:\Home\site\wwwroot\newrelic"
31-
Write-Host "NEWRELIC_LICENSEKEY [REPLACE WITH YOUR LICENSE KEY]"
30+
Write-Host "NEW_RELIC_HOME D:\Home\site\wwwroot\newrelic"
31+
Write-Host "NEW_RELIC_LICENSE_KEY [REPLACE WITH YOUR LICENSE KEY]"

build/build_functions.ps1

+8-8
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ function Set-SystemEnvironment {
214214
[Environment]::SetEnvironmentVariable("COR_PROFILER", "{71DA0A04-7777-4EC6-9643-7D28B46A8A41}", "Machine")
215215
if($Architecture -like "All" -or $Architecture -like "x64") {
216216
[Environment]::SetEnvironmentVariable("COR_PROFILER_PATH", "$HomePath\newrelichome_x64\NewRelic.Profiler.dll", "Machine")
217-
[Environment]::SetEnvironmentVariable("NEWRELIC_HOME", "$HomePath\newrelichome_x64", "Machine")
217+
[Environment]::SetEnvironmentVariable("NEW_RELIC_HOME", "$HomePath\newrelichome_x64", "Machine")
218218
}
219219
else {
220220
[Environment]::SetEnvironmentVariable("COR_PROFILER_PATH", "$HomePath\newrelichome_x86\NewRelic.Profiler.dll", "Machine")
221-
[Environment]::SetEnvironmentVariable("NEWRELIC_HOME", "$HomePath\newrelichome_x86", "Machine")
221+
[Environment]::SetEnvironmentVariable("NEW_RELIC_HOME", "$HomePath\newrelichome_x86", "Machine")
222222
}
223223
}
224224

@@ -227,11 +227,11 @@ function Set-SystemEnvironment {
227227
[Environment]::SetEnvironmentVariable("CORECLR_PROFILER", "{36032161-FFC0-4B61-B559-F6C5D41BAE5A}", "Machine")
228228
if($Architecture -like "All" -or $Architecture -like "x64") {
229229
[Environment]::SetEnvironmentVariable("CORECLR_PROFILER_PATH", "$HomePath\newrelichome_x64_coreclr\NewRelic.Profiler.dll", "Machine")
230-
[Environment]::SetEnvironmentVariable("NEWRELIC_HOME", "$HomePath\newrelichome_x64", "Machine")
230+
[Environment]::SetEnvironmentVariable("NEW_RELIC_HOME", "$HomePath\newrelichome_x64", "Machine")
231231
}
232232
else {
233233
[Environment]::SetEnvironmentVariable("CORECLR_PROFILER_PATH", "$HomePath\newrelichome_x86_coreclr\NewRelic.Profiler.dll", "Machine")
234-
[Environment]::SetEnvironmentVariable("NEWRELIC_HOME", "$HomePath\newrelichome_x86", "Machine")
234+
[Environment]::SetEnvironmentVariable("NEW_RELIC_HOME", "$HomePath\newrelichome_x86", "Machine")
235235
}
236236
}
237237
}
@@ -251,11 +251,11 @@ function Set-SessionEnvironment {
251251
$env:COR_PROFILER = "{71DA0A04-7777-4EC6-9643-7D28B46A8A41}"
252252
if($Architecture -like "All" -or $Architecture -like "x64") {
253253
$env:COR_PROFILER_PATH = "$HomePath\newrelichome_x64\NewRelic.Profiler.dll"
254-
$env:NEWRELIC_HOME = "$HomePath\newrelichome_x64"
254+
$env:NEW_RELIC_HOME = "$HomePath\newrelichome_x64"
255255
}
256256
else {
257257
$env:COR_PROFILER_PATH = "$HomePath\newrelichome_x86\NewRelic.Profiler.dll"
258-
$env:NEWRELIC_HOME = "$HomePath\newrelichome_x86"
258+
$env:NEW_RELIC_HOME = "$HomePath\newrelichome_x86"
259259
}
260260
}
261261

@@ -264,11 +264,11 @@ function Set-SessionEnvironment {
264264
$env:CORECLR_PROFILER = "{36032161-FFC0-4B61-B559-F6C5D41BAE5A}"
265265
if($Architecture -like "All" -or $Architecture -like "x64") {
266266
$env:CORECLR_PROFILER_PATH = "$HomePath\newrelichome_x64_coreclr\NewRelic.Profiler.dll"
267-
$env:NEWRELIC_HOME = "$HomePath\newrelichome_x64"
267+
$env:NEW_RELIC_HOME = "$HomePath\newrelichome_x64"
268268
}
269269
else {
270270
$env:CORECLR_PROFILER_PATH = "$HomePath\newrelichome_x86_coreclr\NewRelic.Profiler.dll"
271-
$env:NEWRELIC_HOME = "$HomePath\newrelichome_x86"
271+
$env:NEW_RELIC_HOME = "$HomePath\newrelichome_x86"
272272
}
273273
}
274274
}

build/setupDotnetAgentDevelopmentEnvVars.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ $pathToDotnetAgentRepo = "C:\workspace\dotnet_agent"
88
[Environment]::SetEnvironmentVariable("COR_ENABLE_PROFILING", "1", "Machine")
99
[Environment]::SetEnvironmentVariable("COR_PROFILER", "{71DA0A04-7777-4EC6-9643-7D28B46A8A41}", "Machine")
1010
[Environment]::SetEnvironmentVariable("COR_PROFILER_PATH", "$pathToDotnetAgentRepo\Agent\New Relic Home x64\NewRelic.Profiler.dll", "Machine")
11-
[Environment]::SetEnvironmentVariable("NEWRELIC_HOME", "$pathToDotnetAgentRepo\Agent\New Relic Home x64", "Machine")
11+
[Environment]::SetEnvironmentVariable("NEW_RELIC_HOME", "$pathToDotnetAgentRepo\Agent\New Relic Home x64", "Machine")
1212
[Environment]::SetEnvironmentVariable("NEW_RELIC_HOST", "staging-collector.newrelic.com", "Machine")
1313
[Environment]::SetEnvironmentVariable("NEW_RELIC_LICENSE_KEY", "b25fd3ca20fe323a9a7c4a092e48d62dc64cc61d", "Machine")
1414
# .NET Core Stuff
1515
[Environment]::SetEnvironmentVariable("CORECLR_ENABLE_PROFILING", "1", "Machine")
1616
[Environment]::SetEnvironmentVariable("CORECLR_PROFILER", "{71DA0A04-7777-4EC6-9643-7D28B46A8A41}", "Machine")
1717
[Environment]::SetEnvironmentVariable("CORECLR_PROFILER_PATH", "$pathToDotnetAgentRepo\Agent\New Relic Home x64 CoreClr\NewRelic.Profiler.dll", "Machine")
18-
[Environment]::SetEnvironmentVariable("CORECLR_NEWRELIC_HOME", "$pathToDotnetAgentRepo\Agent\New Relic Home x64 CoreClr", "Machine")
18+
[Environment]::SetEnvironmentVariable("CORECLR_NEW_RELIC_HOME", "$pathToDotnetAgentRepo\Agent\New Relic Home x64 CoreClr", "Machine")

docs/development.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You need to configure the following environment variables for the agent to attac
3434
#### Environment variables for .NET Framework
3535
```bash
3636
NEW_RELIC_LICENSE_KEY=<your New Relic license key>
37-
NEWRELIC_HOME=path\to\home\directory
37+
NEW_RELIC_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
@@ -43,7 +43,7 @@ COR_PROFILER_PATH=path\to\home\directory\NewRelic.Profiler.dll
4343
#### Environment variables for .NET Core
4444
```bash
4545
NEW_RELIC_LICENSE_KEY=<your New Relic license key>
46-
CORECLR_NEWRELIC_HOME=path\to\home\directory
46+
CORECLR_NEW_RELIC_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_NEWRELIC_HOME=D:\Home\site\wwwroot\newrelic
32+
CORECLR_NEW_RELIC_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

0 commit comments

Comments
 (0)