diff --git a/src/content/docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring.mdx b/src/content/docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring.mdx new file mode 100644 index 00000000000..ecbc20135b5 --- /dev/null +++ b/src/content/docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring.mdx @@ -0,0 +1,77 @@ +--- +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] + + +* Azure Functions hosted on [consumption plan](https://learn.microsoft.com/en-us/azure/azure-functions/consumption-plan) or [dedicated plan](https://learn.microsoft.com/en-us/azure/azure-functions/dedicated-plan). + +* You must have the [required permission to access kudu service](https://learn.microsoft.com/en-us/azure/app-service/resources-kudu#access-kudu-for-your-app). + +* A New Relic account with either an [admin role](/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model/#roles) or an [Infrastructure manager role](/docs/accounts/original-accounts-billing/original-users-roles/users-roles-original-user-model#add-on). + +* A . + +* .NET agent version 10.30 or above. + + + + +End-to-end distributed tracing is supported only for HTTP requests. Additionally, traces for calls to external services, such as Databases, and Service Bus, are still available. + + + + + + +## Supported runtimes + +Based on your hosting environment, the following runtimes are supported. + + + + + Linux + Windows + Containerized functions + + + + + + +* .NET: `dotnet6.0`, `dotnet8.0` + + + + + + +* .NET: `dotnet6.0`, `dotnet8.0` + + + + + +* .NET: `dotnet6.0`, `dotnet8.0` + + + + + + +## What's next + + + Get started with instrumentation and configuration for your Azure Functions + + + + + + diff --git a/src/content/docs/serverless-function-monitoring/azure-function-monitoring/env-variables-azure.mdx b/src/content/docs/serverless-function-monitoring/azure-function-monitoring/env-variables-azure.mdx new file mode 100644 index 00000000000..1bf8edf6570 --- /dev/null +++ b/src/content/docs/serverless-function-monitoring/azure-function-monitoring/env-variables-azure.mdx @@ -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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Environment variableDefault valueOptionsDescription
`CORECLR_ENABLE_PROFILING``0``0`, `1`**Required**. Enable profiling by setting this to `1`.
`CORECLR_PROFILER`**Required**. Set this to enable the .NET agent.
`CORECLR_NEWRELIC_HOME`**Required**. Set this to enable the .NET agent.
`CORECLR_PROFILER_PATH`**Required**. Set this to enable the .NET agent.
`NEW_RELIC_DISTRIBUTED_TRACING_ENABLED``true``true`, `false`Generate traces by enabling distributed tracing.
`NEW_RELIC_APP_NAME`Set the application name, though it is not used in the New Relic UI.
`NEW_RELIC_AZURE_FUNCTION_MODE_ENABLED``1``1`, `0`Disable Azure Functions mode by setting the value to `0`.
`NEW_RELIC_LOG_DIRECTORY`Modify the location where you want to stroe the agent and profiler logs.
`NEW_RELIC_LOG_LEVEL``info``info`, `debug`, `finest`Set the agent log level.
+ + +## What's next + + + Get started with instrumentation and configuration for your Azure Functions + + \ No newline at end of file diff --git a/src/content/docs/serverless-function-monitoring/azure-function-monitoring/install-serverless-azure-monitoring.mdx b/src/content/docs/serverless-function-monitoring/azure-function-monitoring/install-serverless-azure-monitoring.mdx new file mode 100644 index 00000000000..ee89fcf7e80 --- /dev/null +++ b/src/content/docs/serverless-function-monitoring/azure-function-monitoring/install-serverless-azure-monitoring.mdx @@ -0,0 +1,277 @@ +--- +title: "Install and configure Azure Functions monitoring on New Relic" +metaDescription: Configure your Azure Functions with New Relic +freshnessValidatedDate: never + +--- + +## Before you begin [#begin] + +Ensure that your Azure Functions meet our [compatibility and requirements](/docs/serverless-function-monitoring/azure-function-monitoring/compatibility-requirement-azure-monitoring). + + + + +## 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 allows you to see the metrics in the New Relic UI. For more information, refer [Azure integration](https://docs.newrelic.com/docs/infrastructure/microsoft-azure-integrations/azure-integrations-list/azure-functions-monitoring-integration/#polling). + + + +## Instrument your Azure Functions with the New Relic .NET Agent + +Based on your requirement, select one of the following options to instrument your Azure Functions with the New Relic .NET agent. + + + + + Linux + Windows + Containerized functions + + + + + + + 1. Add the `NewRelic.Agent` NuGet package to your application project. + + * In Visual Studio code editor, use 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. + + + + + Navigate to Kudu service page and do the following: + + 1. In the Azure portal, navigate to your function app. + 2. Click the **Development tools** section, and select **Advanced Tools > Go**. + 3. To view the available site extensions, click the **Site extensions** tab. + 4. To install the extension, search for `New Relic .NET Agent` and, click **+**. + + + + + + To install the New Relic .NET agent, in the final stage of your Dockerfile, add the following lines: + + ```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/* + + ``` + + + + + + + + + + + +## Configure the environment variables + +After you've instrumented your Azure Functions with the New Relic .NET Agent, do the following to configure the [environment variables](/docs/serverless-function-monitoring/azure-function-monitoring/env-variables-azure) to send the data to New Relic. + +1. Navigate to your Azure Functions in the Azure portal, under **Settings**, click **Environment variables**, and then click **Advanced edit**. + +2. Based on your application requirement, paste the following values. + + +Ensure that you add a comma at the end of the last existing line and update your license key and app name in the following configurations. + + + + + + Linux + Windows + Containerized functions + + + + + + + + ```json + { + "name": "CORECLR_ENABLE_PROFILING", + "value": "1", + "slotSetting": false + }, + { + "name": "CORECLR_NEWRELIC_HOME", + "value": "/home/site/wwwroot/newrelic", + "slotSetting": false + }, + { + "name": "CORECLR_PROFILER", + "value": "{36032161-FFC0-4B61-B559-F6C5D41BAE5A}", + "slotSetting": false + }, + { + "name": "CORECLR_PROFILER_PATH", + "value": "/home/site/wwwroot/newrelic/libNewRelicProfiler.so", + "slotSetting": false + }, + { + "name": "NEW_RELIC_AZURE_FUNCTION_MODE_ENABLED", + "value": "1", + "slotSetting": false + }, + { + "name": "NEW_RELIC_LICENSE_KEY", + "value": "", + "slotSetting": false + }, + { + "name": "NEWRELIC_LOG_DIRECTORY", + "value": "/home/LogFiles/NewRelic", + "slotSetting": false + }, + { + "name": "NEWRELIC_LOG_LEVEL", + "value": "info", + "slotSetting": false + }, + + + ``` + + + + + + ```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": "", + "slotSetting": false + }, + { + "name": "NEWRELIC_LOG_LEVEL", +"value": "info", + "slotSetting": false + }, + { + "name": "NEW_RELIC_APP_NAME", + "value": "", + "slotSetting": false + }, + + ``` + + + + + ```json +{ + "name": "CORECLR_ENABLE_PROFILING", + "value": "1", + "slotSetting": false + }, + { + "name": "CORECLR_NEWRELIC_HOME", + "value": "/usr/local/newrelic-dotnet-agent", + "slotSetting": false + }, + { + "name": "CORECLR_PROFILER", + "value": "{36032161-FFC0-4B61-B559-F6C5D41BAE5A}", + "slotSetting": false + }, + { + "name": "CORECLR_PROFILER_PATH", + "value": "/usr/local/newrelic-dotnet-agent/libNewRelicProfiler.so", + "slotSetting": false + }, + { + "name": "NEW_RELIC_AZURE_FUNCTION_MODE_ENABLED", + "value": "1", + "slotSetting": false + }, + { + "name": "NEW_RELIC_LICENSE_KEY", + "value": "", + "slotSetting": false + }, + { + "name": "NEWRELIC_LOG_DIRECTORY", + "value": "/home/LogFiles/NewRelic", + "slotSetting": false + }, + { + "name": "NEWRELIC_LOG_LEVEL", + "value": "info", + "slotSetting": false + }, + + ``` + + + + + + + + + + + + + +## Restart your Azure Functions + +After you've added the environment variables, restart your Azure Functions to apply the changes. + + + + +## What's next + +After you complete the installation and configuration steps, send traffic to your Azure Functions to see the metrics in the New Relic UI dashboard. + + + + + diff --git a/src/content/docs/serverless-function-monitoring/azure-function-monitoring/introduction-azure-monitoring.mdx b/src/content/docs/serverless-function-monitoring/azure-function-monitoring/introduction-azure-monitoring.mdx new file mode 100644 index 00000000000..f69c24c7109 --- /dev/null +++ b/src/content/docs/serverless-function-monitoring/azure-function-monitoring/introduction-azure-monitoring.mdx @@ -0,0 +1,33 @@ +--- +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, see distributed tracing, and record details about the source events and your function's responses. + + + + +For Azure Functions, the agent reports data such as distributed traces and logs, which are available under 'Services - APM' as an APM entity. However, a separate entity (provided by infrastructure monitoring) for Azure Functions still exists. + + + +new-relic-azure-function-monitoring.gif + + +## What's next + + + Learn more about supported runtimes and prerequisites + Get started with instrumentation and configuration for your Azure Functions + + diff --git a/src/content/docs/serverless-function-monitoring/overview.mdx b/src/content/docs/serverless-function-monitoring/overview.mdx index 7b31a511b6d..a74042b19dd 100644 --- a/src/content/docs/serverless-function-monitoring/overview.mdx +++ b/src/content/docs/serverless-function-monitoring/overview.mdx @@ -1,5 +1,5 @@ --- -title: Serverless function monitoring +title: Serverless monitoring redirects: - /docs/full-stack-observability/monitor-everything/observability-solutions/serverless-monitoring - /docs/serverless-function-monitoring @@ -7,9 +7,9 @@ freshnessValidatedDate: never --- Serverless functions are a way to run code in the cloud without worrying about managing servers. Instead of setting up and maintaining servers, the cloud provider takes care of everything for you. This means that developers can focus on writing code that responds to specific events, like a user clicking a button, without dealing with the technical details of server management. -By leveraging New Relic's serverless function monitoring capabilities, organizations can enhance their operational efficiency, improve application performance, and ensure a seamless user experience. +By leveraging New Relic's serverless monitoring capabilities, organizations can enhance their operational efficiency, improve application performance, and ensure a seamless user experience. -Following are some of the key benefits of using New Relic for serverless function monitoring: +Following are some of the key benefits of using New Relic for serverless monitoring: * **Unified monitoring:** Visualize all your serverless functions in a single dashboard, regardless of the cloud provider, simplifying the management and monitoring of functions across different environments @@ -22,6 +22,8 @@ Following are some of the key benefits of using New Relic for serverless functio Select the cloud provider you are using to learn more about how New Relic can help you monitor your serverless functions: + + diff --git a/src/nav/serverless-function-monitoring.yml b/src/nav/serverless-function-monitoring.yml index dc9c3710519..a906cfb08da 100644 --- a/src/nav/serverless-function-monitoring.yml +++ b/src/nav/serverless-function-monitoring.yml @@ -1,4 +1,4 @@ -title: Serverless function monitoring +title: Serverless monitoring path: /docs/serverless-function-monitoring pages: - title: Overview @@ -46,7 +46,18 @@ pages: - title: Forward your Lambda function logs with OpenTelemetry 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 + - title: Azure Functions monitoring + pages: + - title: Introduction to Azure Functions 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: Google Cloud Functions monitoring path: /docs/infrastructure/google-cloud-platform-integrations/gcp-integrations-list/google-cloud-functions-monitoring-integration diff --git a/static/images/azure_function_monitoring.gif b/static/images/azure_function_monitoring.gif new file mode 100644 index 00000000000..c7bd7b18e93 Binary files /dev/null and b/static/images/azure_function_monitoring.gif differ