Skip to content

Commit

Permalink
Merge pull request #19881 from tippmar-nr/dotnet/azure-functions-inst…
Browse files Browse the repository at this point in the history
…all-doc-update

docs(dotnet): Update environment variables required for Azure Functions
  • Loading branch information
cbehera-newrelic authored Feb 17, 2025
2 parents b1ecb17 + 769c828 commit bde8ed8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Environment variables for Azure function monitoring
metaDescription: "Configure environment variables to monitor your Azure functions with New Relic"
freshnessValidatedDate: never
tags:
- AWS Lambda
- Azure Functions
- Environment Variables
- Configuration
- Secrets Management
Expand Down Expand Up @@ -33,7 +33,7 @@ Environment variables are a way to store configuration and secrets outside of yo
<td>**Required**. Set this to enable the .NET agent.</td>
</tr>
<tr>
<td>`CORECLR_NEWRELIC_HOME`</td>
<td>`CORECLR_NEW_RELIC_HOME`</td>
<td></td>
<td></td>
<td>**Required**. Set this to enable the .NET agent.</td>
Expand All @@ -44,25 +44,12 @@ Environment variables are a way to store configuration and secrets outside of yo
<td></td>
<td>**Required**. Set this to enable the .NET agent.</td>
</tr>

<tr>
<td>`NEW_RELIC_DISTRIBUTED_TRACING_ENABLED`</td>
<td>`true`</td>
<td>`true`, `false`</td>
<td>Generate traces by enabling distributed tracing.</td>
</tr>

<tr>
<td>`NEW_RELIC_APP_NAME`</td>
<td></td>
<td></td>
<td>Set the application name, though it is not used in the New Relic UI.</td>
</tr>
<tr>
<td>`NEW_RELIC_AZURE_FUNCTION_MODE_ENABLED`</td>
<td>`1`</td>
<td>`0`</td>
<td>`1`, `0`</td>
<td>Disable Azure Functions mode by setting the value to `0`.</td>
<td>Enable Azure Functions mode by setting the value to `1`.</td>
</tr>
<tr>
<td>`NEW_RELIC_LOG_DIRECTORY`</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ Based on your requirement, select one of the following options to instrument you
</TabsPageItem>
<TabsPageItem id="windows-instrumentation">

Navigate to Kudu service page and do the following:
The New Relic Azure Websites Extension (v1.6.0 and later) automatically configures instrumentation for your Windows Azure Function.

To install the New Relic Azure Websites Extension, follow these steps:

1. In the Azure portal, navigate to your function app.
2. Click the <DNT>**Development tools**</DNT> section, and select <DNT>**Advanced Tools > Go**</DNT>.
3. To view the available site extensions, click the <DNT>**Site extensions**</DNT> tab.
4. To install the extension, search for `New Relic .NET Agent` and, click <DNT>**+**</DNT>.
2. Click the <DNT>**Development tools**</DNT> section, and select <DNT>**Extensions**</DNT>.
3. Click <DNT>**+ Add**</DNT>.
4. Select <DNT>**Search for an extension to install**</DNT> and enter `New Relic .NET Agent` in the <DNT>**Filter items**</DNT> box.
5. Select the <DNT>**New Relic .NET Agent(vx.x.x) - New Relic**</DNT> extension and click <DNT>**Add**</DNT>.
6. When installation is complete, the extension will appear in the list of installed extensions. To verify correct installation, click the link under the "Browse" column to view the installation log.

</TabsPageItem>

Expand Down Expand Up @@ -108,7 +112,7 @@ Ensure that you add a comma at the end of the last existing line and update your
"slotSetting": false
},
{
"name": "CORECLR_NEWRELIC_HOME",
"name": "CORECLR_NEW_RELIC_HOME",
"value": "/home/site/wwwroot/newrelic",
"slotSetting": false
},
Expand All @@ -128,72 +132,37 @@ Ensure that you add a comma at the end of the last existing line and update your
"slotSetting": false
},
{
"name": "NEW_RELIC_LICENSE_KEY",
"value": "YOUR_NEW_RELIC_LICENSE_KEY",
"slotSetting": false
},
{
"name": "NEWRELIC_LOG_DIRECTORY",
"name": "NEW_RELIC_LOG_DIRECTORY",
"value": "/home/LogFiles/NewRelic",
"slotSetting": false
},
{
"name": "NEWRELIC_LOG_LEVEL",
"value": "info",
"name": "NEW_RELIC_LICENSE_KEY",
"value": "<your newrelic license key here>",
"slotSetting": false
},
}
```

</TabsPageItem>

<TabsPageItem id="windows-configuration">

```json
{
"name": "CORECLR_PROFILER_PATH",
"value": "C:\\home\\NewRelicAgent\\Core\\NewRelic.Profiler.dll",
"slotSetting": false
},
{
"name": "CORECLR_NEWRELIC_HOME",
"value": "C:\\home\\NewRelicAgent\\Core",
"slotSetting": false
},
{
"name": "NEWRELIC_LOG_DIRECTORY",
"value": "C:\\home\\LogFiles\\NewRelic",
"slotSetting": false
},
{
"name": "NEW_RELIC_AZURE_FUNCTION_MODE_ENABLED",
"value": "1",
"slotSetting": false
},
{
"name": "CORECLR_ENABLE_PROFILING",
"value": "1",
"slotSetting": false
},
{
"name": "CORECLR_PROFILER",
"value": "{36032161-FFC0-4B61-B559-F6C5D41BAE5A}",
"slotSetting": false
},
{
"name": "NEW_RELIC_LICENSE_KEY",
"value": "YOUR_NEW_RELIC_LICENSE_KEY",
"slotSetting": false
},
}
```

Optionally, you can specify the version of the .NET agent you want to install by adding the following environment variable:

```json
{
"name": "NEWRELIC_LOG_LEVEL",
"value": "info",
"name": "NEW_RELIC_AGENT_VERSION_OVERRIDE",
"value": "10.35.0",
"slotSetting": false
},
{
"name": "NEW_RELIC_APP_NAME",
"value": "YOUR_APP_NAME",
"slotSetting": false
},
}
```
</TabsPageItem >

Expand All @@ -206,7 +175,7 @@ Ensure that you add a comma at the end of the last existing line and update your
"slotSetting": false
},
{
"name": "CORECLR_NEWRELIC_HOME",
"name": "CORECLR_NEW_RELIC_HOME",
"value": "/usr/local/newrelic-dotnet-agent",
"slotSetting": false
},
Expand All @@ -226,20 +195,17 @@ Ensure that you add a comma at the end of the last existing line and update your
"slotSetting": false
},
{
"name": "NEW_RELIC_LICENSE_KEY",
"value": "YOUR_NEW_RELIC_LICENSE_KEY",
"slotSetting": false
},
{
"name": "NEWRELIC_LOG_DIRECTORY",
"name": "NEW_RELIC_LOG_DIRECTORY",
"value": "/home/LogFiles/NewRelic",
"slotSetting": false
},
{
"name": "NEWRELIC_LOG_LEVEL",
"value": "info",
"name": "NEW_RELIC_LICENSE_KEY",
"value": "<your newrelic license key here>",
"slotSetting": false
},
}


```

</TabsPageItem>
Expand Down

0 comments on commit bde8ed8

Please sign in to comment.