Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cbehera-newrelic committed Dec 31, 2024
1 parent 5cd2030 commit d90240a
Show file tree
Hide file tree
Showing 8 changed files with 331 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: Compatibility and requirements for instrumenting Azure functions
metaDescription: Azure function monitoring agent compatibility and requirements.
freshnessValidatedDate: never
---

Before you [instrument Azure functions](/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/configure-serverless-aws-monitoring), make sure your system meets the following requirements.

## Basic requirements [#requirements]


* A New Relic account with either an [admin role](/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model/#roles) or have the **Infrastructure manager** [add-on role](/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model#add-on).

* A <InlinePopover type="userKey" />.


<Callout variant="note">

Distributed tracing is supported for HTTP requests only. For more information, see [Distributed tracing](/docs/apm/distributed-tracing/distributed-tracing-ui/understand-distributed-tracing).

Check notice on line 19 in src/content/docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring.mdx#L19

[Microsoft.Passive] 'is supported' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'is supported' looks like passive voice.", "location": {"path": "src/content/docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring.mdx", "range": {"start": {"line": 19, "column": 21}}}, "severity": "INFO"}

</Callout>





## Supported runtimes

Based on your hosting environment, the following runtimes are supported.

Check notice on line 29 in src/content/docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring.mdx#L29

[Microsoft.Passive] 'are supported' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'are supported' looks like passive voice.", "location": {"path": "src/content/docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring.mdx", "range": {"start": {"line": 29, "column": 59}}}, "severity": "INFO"}

<Tabs>
<TabsBar>

<TabsBarItem id="1">Linux</TabsBarItem>
<TabsBarItem id="2">Windows</TabsBarItem>
<TabsBarItem id="3">Containerized functions</TabsBarItem>

</TabsBar>
<TabsPages>


<TabsPageItem id="1">
* .NET: `dotnet10.30.0`

</TabsPageItem>


<TabsPageItem id="2">

* .NET: `dotnet10.30.0`

</TabsPageItem>

<TabsPageItem id="3">

* .NET: `dotnet10.30.0`
</TabsPageItem>

</TabsPages>

</Tabs>

## What's next

<DocTiles>
<DocTile title="Install and configure Lambda monitoring" path="/docs/serverless-function-monitoring/azure-function-monitoring/install-serverless-azure-monitoring" >Get started with instrumentation and configuration for your Azure functions</DocTile>

</DocTiles>




Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: Environment variables for Azure function monitoring
metaDescription: "Configure environment variables to monitor your Azure functions with New Relic"
freshnessValidatedDate: never
tags:
- AWS Lambda
- Environment Variables
- Configuration
- Secrets Management
---
Environment variables are a way to store configuration and secrets outside of your code. The following tables display the mandatory variables and runtime specific variables that you can set to monitor your Azure functions with New Relic.

Check notice on line 11 in src/content/docs/serverless-function-monitoring/azure-function-monitoring/env-variables-azure.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/serverless-function-monitoring/azure-function-monitoring/env-variables-azure.mdx#L11

[new-relic.ComplexWords] Consider using 'check' or 'watch' instead of 'monitor'.
Raw output
{"message": "[new-relic.ComplexWords] Consider using 'check' or 'watch' instead of 'monitor'.", "location": {"path": "src/content/docs/serverless-function-monitoring/azure-function-monitoring/env-variables-azure.mdx", "range": {"start": {"line": 11, "column": 194}}}, "severity": "INFO"}

<table>
<thead>
<tr>
<th>Environment variable</th>
<th>Default value</th>
<th>Options</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>`CORECLR_ENABLE_PROFILING`</td>
<td>`0`</td>
<td>`0`, `1`</td>
<td>**Required**: Enable profiling by setting this to `1`</td>
</tr>
<tr>
<td>`CORECLR_PROFILER`</td>
<td></td>
<td>`{36032161-FFC0-4B61-B559-F6C5D41BAE5A}`</td>
<td>**Required**: Set this to `{36032161-FFC0-4B61-B559-F6C5D41BAE5A}` to enable the .NET agent</td>
</tr>
<tr>
<td>`CORECLR_NEWRELIC_HOME`</td>
<td></td>
<td>`/opt/lib/newrelic-dotnet-agent`</td>
<td>**Required**: Set this to `/opt/lib/newrelic-dotnet-agent` to enable the .NET agent</td>
</tr>
<tr>
<td>`CORECLR_PROFILER_PATH`</td>
<td></td>
<td>`/opt/lib/newrelic-dotnet-agent/libNewRelicProfiler.so`</td>
<td>**Required**: Set this to `/opt/lib/newrelic-dotnet-agent/libNewRelicProfiler.so` 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>`1`, `0`</td>
<td>Disable Azure functio mode by setting thr value to `0`</td>
</tr>
<tr>
<td>`NEW_RELIC_LOG_DIRECTORY`</td>
<td></td>
<td></td>
<td>Modify the location where you want to strore the agent and profiler logs. </td>
</tr>
<tr>
<td>`NEW_RELIC_LOG_LEVEL`</td>
<td>`info`</td>
<td>`info`, `debug`, `finest`</td>
<td>Set the agent log level</td>
</tr>
</tbody>
</table>


## What's next

<DocTiles>
<DocTile title="Install and configure Lambda monitoring" path="/docs/serverless-function-monitoring/azure-function-monitoring/install-serverless-azure-monitoring" >Get started with instrumentation and configuration for your Azure functions</DocTile>

</DocTiles>
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
title: "Install and configure Azure function monitoring on New Relic"
metaDescription: Configure your Azure functions with New Relic
freshnessValidatedDate: never

---

## Before you begin [#begin]

If you haven't done so, you may want to check that your Lambda function meets our [compatibility and requirements](/docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring).

<Steps>

<Step>
## Link your Azure account to New Relic

You can link your Azure account to New Relic by configuring the polling of Azure Monitor metrics. This will allow you to see the metrics in the New Relic UI. For more information, see [Azure integration](https://docs.newrelic.com/docs/infrastructure/microsoft-azure-integrations/azure-integrations-list/azure-functions-monitoring-integration/#polling).

Check notice on line 17 in src/content/docs/serverless-function-monitoring/azure-function-monitoring/install-serverless-azure-monitoring.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/serverless-function-monitoring/azure-function-monitoring/install-serverless-azure-monitoring.mdx#L17

[new-relic.ComplexWords] Consider using 'check' or 'watch' instead of 'Monitor'.
Raw output
{"message": "[new-relic.ComplexWords] Consider using 'check' or 'watch' instead of 'Monitor'.", "location": {"path": "src/content/docs/serverless-function-monitoring/azure-function-monitoring/install-serverless-azure-monitoring.mdx", "range": {"start": {"line": 17, "column": 82}}}, "severity": "INFO"}
</Step>

<Step>
## Instrument your Azure Function with the New Relic .NET Agent

Based on your requirement, select one of the following options to instrument your Azure Function with the New Relic .NET Agent.

<Tabs>
<TabsBar>

<TabsBarItem id="linux-instrumentation">Linux</TabsBarItem>
<TabsBarItem id="windows-instrumentation">Windows</TabsBarItem>
<TabsBarItem id="containerized-instrumentation">Containerized functions</TabsBarItem>
</TabsBar>

<TabsPages>

<TabsPageItem id="linux-instrumentation">

1. Add the `NewRelic.Agent` NuGet package to your application project.
* In Visual Studio code editor, use the NuGet Package Manager to search for and add the latest version of `NewRelic.Agent` to your application.
* If you're using other development environments, you can add the package with `dotnet add packages NewRelic.Agent`.

2. Use your preferred publishing mechanism to deploy your updated application to Azure. This includes the New Relic agent, which is installed to the `/home/site/www/newrelic` folder.

</TabsPageItem>
<TabsPageItem id="windows-instrumentation">

1. Navigate to the Kudu service page and do the following:
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. Click the <DNT>**Site extensions**</DNT> tab to view the available site extension to install.
4. Search for the `New Relic .NET Agent` and to install the extension, click <DNT>**+**</DNT>.

</TabsPageItem>

<TabsPageItem id="containerized-instrumentation">

In the final stage of your Dockerfile, add the following lines to install the New Relic .NET agent:

```dockerfile
# install the latest New Relic .NET agent using the apt-get package manager
RUN apt-get update && apt-get install -y wget ca-certificates gnupg \
&& echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | tee /etc/apt/sources.list.d/newrelic.list \
&& wget https://download.newrelic.com/548C16BF.gpg \
&& apt-key add 548C16BF.gpg \
&& apt-get update \
&& apt-get install -y newrelic-dotnet-agent \
&& rm -rf /var/lib/apt/lists/*

```


</TabsPageItem>

</TabsPages>
</Tabs>


</Step>

<Step>
## Configure the environment variables

After you've instrumented your Azure Function with the New Relic .NET Agent, you need to configure the environment variables to send the data to New Relic. For more information, refer to [configure environment variables](/docs/serverless-function-monitoring/azure-function-monitoring/env-variables-azure).


</Step>

<Step>
## Restart your Azure Function

After you've added the environment variables, restart your Azure Function to apply the changes.
</Step>

<Step>
## Send traffic to your Azure Function

Send traffic to the azure function and review the NewRelic UI dashboard to see the metrics.
</Step>

</Steps>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "Instrument your containerized Azure Function with the New Relic .NET Agent"
metaDescription: Configure your Azure functions with New Relic
freshnessValidatedDate: never

---
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Instrument your Azure Function on Linux with the New Relic .NET Agent"
metaDescription: Configure your Azure functions with New Relic
freshnessValidatedDate: never

---

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "Instrument your Azure Function on Windows with the New Relic .NET Agent"
metaDescription: Configure your Azure functions with New Relic
freshnessValidatedDate: never

---
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "Introduction to Azure functions monitoring"
metaDescription: This provides an overview of New Relic's AWS Lambda monitoring and details how to link your accounts.
redirects:
- /docs/infrastructure/microsoft-azure-integrations/azure-integrations-list/azure-functions-monitoring-integration
freshnessValidatedDate: never
---



New Relic's instrumentation for Azure functions offers deep visibility into the inner workings of your functions. By adding the New Relic agent to your function, each invocation is monitored by New Relic. This enables you to track the duration of function invocations, monitor errors, distributed tracing, and record details about the source events and your function's responses.

Check notice on line 11 in src/content/docs/serverless-function-monitoring/azure-function-monitoring/introduction-azure-monitoring.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/serverless-function-monitoring/azure-function-monitoring/introduction-azure-monitoring.mdx#L11

[Microsoft.Passive] 'is monitored' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'is monitored' looks like passive voice.", "location": {"path": "src/content/docs/serverless-function-monitoring/azure-function-monitoring/introduction-azure-monitoring.mdx", "range": {"start": {"line": 11, "column": 179}}}, "severity": "INFO"}

Check notice on line 11 in src/content/docs/serverless-function-monitoring/azure-function-monitoring/introduction-azure-monitoring.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] src/content/docs/serverless-function-monitoring/azure-function-monitoring/introduction-azure-monitoring.mdx#L11

[new-relic.ComplexWords] Consider using 'check' or 'watch' instead of 'monitor'.
Raw output
{"message": "[new-relic.ComplexWords] Consider using 'check' or 'watch' instead of 'monitor'.", "location": {"path": "src/content/docs/serverless-function-monitoring/azure-function-monitoring/introduction-azure-monitoring.mdx", "range": {"start": {"line": 11, "column": 270}}}, "severity": "INFO"}

Add distributed tracing (http)

{/* <img
title="new-relic-lambda-entities-screenshot.png"
alt="new-relic-lambda-entities-screenshot.png"
src="/images/lambda_overview.webp"
/> */}


<Callout variant="tip">

For Azure functions, the agent reports data such as distributed traces and logs, which are available under 'Services - APM' as an APM entity, unlike Lambda monitoring. However, a separate entity for Azure Functions will still exist with only the metric data.


</Callout>

## What's next

<DocTiles>
<DocTile title="Compatibility and requirement" path="/docs/serverless-function-monitoring/azure-function-monitoring/compatibity-requirement-azure-monitoring">Learn more about supported runtimes and prerequisites</DocTile>
<DocTile title="Install and configure Lambda monitoring" path="/docs/serverless-function-monitoring/azure-function-monitoring/install-serverless-azure-monitoring" >Get started with instrumentation and configuration for your Azure functions</DocTile>

</DocTiles>
19 changes: 18 additions & 1 deletion src/nav/serverless-function-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ pages:
path: /docs/serverless-function-monitoring/aws-lambda-monitoring/opentelemetry/otel-adot-log-ingestion-serverless

- title: Azure functions monitoring
path: /docs/infrastructure/microsoft-azure-integrations/azure-integrations-list/azure-functions-monitoring-integration
pages:
- title: Introduction to Azure Function monitoring
path: /docs/serverless-function-monitoring/azure-function-monitoring/introduction-azure-monitoring
- title: Installation and configuration
pages:
- title: Compatibility and requirements
path: /docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring
- title: Install and configure Azure Functions monitoring
path: /docs/serverless-function-monitoring/azure-function-monitoring/install-serverless-azure-monitoring
- title: Environment variables
path: /docs/serverless-function-monitoring/azure-function-monitoring/env-variables-azure
# - title: Instrumentation for Azure functions hosted on Linux
# path: /docs/serverless-function-monitoring/azure-function-monitoring/instrument-linux-function
# - title: Instrumentation for Azure functions hosted on Windows
# path: /docs/serverless-function-monitoring/azure-function-monitoring/instrument-windows-function
# - title: Instrumentation for containerized Azure functions
# path: /docs/serverless-function-monitoring/azure-function-monitoring/instrument-containerized-function

- title: Google Cloud Functions monitoring
path: /docs/infrastructure/google-cloud-platform-integrations/gcp-integrations-list/google-cloud-functions-monitoring-integration

0 comments on commit d90240a

Please sign in to comment.