Skip to content

Commit 1256b24

Browse files
authored
Fixed the Entra info
1 parent 04710ff commit 1256b24

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

articles/azure-functions/configure-monitoring.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Configure monitoring for Azure Functions
33
description: Learn how to connect your function app to Application Insights for monitoring and how to configure data collection.
44
ms.service: azure-functions
55
ms.topic: how-to
6-
ms.date: 07/11/2024
6+
ms.date: 08/06/2024
77
ms.custom: devdivchpfy22
88

99
# Customer intent: As a developer, I want to understand how to configure monitoring for my functions correctly, so I can collect the data that I need.
@@ -48,7 +48,7 @@ Category names are assigned differently in Functions compared to other .NET fram
4848

4949
The following table describes the main categories of logs that the runtime creates:
5050

51-
# [v2.x+](#tab/v2)
51+
### [v2.x+](#tab/v2)
5252

5353
| Category | Table | Description |
5454
| ----- | ----- | ----- |
@@ -65,7 +65,7 @@ The following table describes the main categories of logs that the runtime creat
6565
> [!NOTE]
6666
> For .NET class library functions, these categories assume you're using `ILogger` and not `ILogger<T>`. For more information, see the [Functions ILogger documentation](functions-dotnet-class-library.md#ilogger).
6767
68-
# [v1.x](#tab/v1)
68+
### [v1.x](#tab/v1)
6969

7070
| Category | Table | Description |
7171
| ----- | ----- | ----- |
@@ -90,7 +90,7 @@ The following examples define logging based on the following rules:
9090
+ `Host.Aggregator` and `Host.Results` are set to lower levels. Setting logging levels too high (especially higher than `Information`) can result in loss of metrics and performance data.
9191
+ Logging for function runs is set to `Information`. If necessary, you can [override](functions-host-json.md#override-hostjson-values) this setting in local development to `Debug` or `Trace`.
9292

93-
# [v2.x+](#tab/v2)
93+
### [v2.x+](#tab/v2)
9494

9595
```json
9696
{
@@ -106,7 +106,7 @@ The following examples define logging based on the following rules:
106106
}
107107
```
108108

109-
# [v1.x](#tab/v1)
109+
### [v1.x](#tab/v1)
110110

111111
```json
112112
{
@@ -127,7 +127,7 @@ The following examples define logging based on the following rules:
127127

128128
If *[host.json]* includes multiple logs that start with the same string, the more defined logs ones are matched first. Consider the following example that logs everything in the runtime, except `Host.Aggregator`, at the `Error` level:
129129

130-
# [v2.x+](#tab/v2)
130+
### [v2.x+](#tab/v2)
131131

132132
```json
133133
{
@@ -143,7 +143,7 @@ If *[host.json]* includes multiple logs that start with the same string, the mor
143143
}
144144
```
145145

146-
# [v1.x](#tab/v1)
146+
### [v1.x](#tab/v1)
147147

148148
```json
149149
{
@@ -191,7 +191,7 @@ As noted in the previous section, the runtime aggregates data about function exe
191191

192192
Application Insights has a [sampling](../azure-monitor/app/sampling.md) feature that can protect you from producing too much telemetry data on completed executions at times of peak load. When the rate of incoming executions exceeds a specified threshold, Application Insights starts to randomly ignore some of the incoming executions. The default setting for maximum number of executions per second is 20 (five in version 1.x). You can configure sampling in [*host.json*](./functions-host-json.md#applicationinsights). Here's an example:
193193

194-
# [v2.x+](#tab/v2)
194+
### [v2.x+](#tab/v2)
195195

196196
```json
197197
{
@@ -209,7 +209,7 @@ Application Insights has a [sampling](../azure-monitor/app/sampling.md) feature
209209

210210
You can exclude certain types of telemetry from sampling. In this example, data of type `Request` and `Exception` is excluded from sampling. It ensures that *all* function executions (requests) and exceptions are logged while other types of telemetry remain subject to sampling.
211211

212-
# [v1.x](#tab/v1)
212+
### [v1.x](#tab/v1)
213213

214214
```json
215215
{
@@ -288,11 +288,16 @@ For a function app to send data to Application Insights, it needs to connect to
288288
| Setting name | Description |
289289
| ---- | ---- |
290290
| **[`APPLICATIONINSIGHTS_CONNECTION_STRING`](functions-app-settings.md#applicationinsights_connection_string)** | This setting is recommended and is required when your Application Insights instance runs in a sovereign cloud. The connection string supports other [new capabilities](../azure-monitor/app/migrate-from-instrumentation-keys-to-connection-strings.md#new-capabilities). |
291-
| **[`APPLICATIONINSIGHTS_AUTHENTICATION_STRING`](./functions-app-settings.md#applicationinsights_authentication_string)** | Connects to Application Insights using Microsoft Entra authentication. The value contains the client ID of either a system-assigned or a user-assigned managed identity that is authorized to publish telemetry to your Application Insights workspace. The string has a format of `ClientId=<YOUR_CLIENT_ID>;Authorization=AAD`. For more information, see [Microsoft Entra authentication for Application Insights](../azure-monitor/app/azure-ad-authentication.md).|
292291
| **[`APPINSIGHTS_INSTRUMENTATIONKEY`](functions-app-settings.md#appinsights_instrumentationkey)** | Legacy setting, which Application Insights has deprecated in favor of the connection string setting. |
293292

294293
When you create your function app in the [Azure portal](./functions-get-started.md) from the command line by using [Azure Functions Core Tools](./create-first-function-cli-csharp.md) or [Visual Studio Code](./create-first-function-vs-code-csharp.md), Application Insights integration is enabled by default. The Application Insights resource has the same name as your function app, and is created either in the same region or in the nearest region.
295294

295+
### Require Microsoft Entra authentication
296+
297+
You can use tbe [`APPLICATIONINSIGHTS_AUTHENTICATION_STRING`](./functions-app-settings.md#applicationinsights_authentication_string) setting to enable connections to Application Insights using Microsoft Entra authentication. The value contains either `Authorization=AAD` for a system-assigned managed identity or `ClientId=<YOUR_CLIENT_ID>;Authorization=AAD` for a user-assigned managed identity. The managed identity must already be available to the function app, with an assigned role equivalent to [Monitoring Metrics Publisher](/azure/role-based-access-control/built-in-roles/monitor#monitoring-metrics-publisher). For more information, see [Microsoft Entra authentication for Application Insights](../azure-monitor/app/azure-ad-authentication.md).|
298+
299+
The [`APPLICATIONINSIGHTS_CONNECTION_STRING`](functions-app-settings.md#applicationinsights_connection_string) setting is still required.
300+
296301
[!INCLUDE [functions-app-insights-disable-local-note](../../includes/functions-app-insights-disable-local-note.md)]
297302

298303
### New function app in the portal

0 commit comments

Comments
 (0)