You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/configure-monitoring.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,23 @@ You can exclude certain types of telemetry from sampling. In this example, data
197
197
198
198
For more information, see [Sampling in Application Insights](../azure-monitor/app/sampling.md).
199
199
200
+
## Enable SQL query collection
201
+
202
+
Application Insights automatically collects data on dependencies for HTTP requests, database calls, and for several bindings. For more information, see [Dependencies](./functions-monitoring.md#dependencies). For SQL calls, the name of the server and database is always collected and stored, but SQL query text isn't collected by default. You can use `dependencyTrackingOptions.enableSqlCommandTextInstrumentation` to enable SQL query text logging by setting (at minimum) the following in your [host.json file](./functions-host-json.md#applicationinsightsdependencytrackingoptions):
203
+
204
+
```json
205
+
"logging": {
206
+
"applicationInsights": {
207
+
"enableDependencyTracking": true,
208
+
"dependencyTrackingOptions": {
209
+
"enableSqlCommandTextInstrumentation": true
210
+
}
211
+
}
212
+
}
213
+
```
214
+
215
+
For more information, see [Advanced SQL tracking to get full SQL query](../azure-monitor/app/asp-net-dependencies.md#advanced-sql-tracking-to-get-full-sql-query).
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-app-settings.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,14 +15,11 @@ There are other function app configuration options in the [host.json](functions-
15
15
Example connection string values are truncated for readability.
16
16
17
17
> [!NOTE]
18
-
> You can use application settings to override host.json setting values without having to change the host.json file itself. This is helpful for scenarios where you need to configure or modify specific host.json settings for a specific environment. This also lets you change host.json settings without having to republish your project. To learn more, see the [host.json reference article](functions-host-json.md#override-hostjson-values). Changes to function app settings require your function app to be restarted.
19
-
20
-
> [!IMPORTANT]
21
-
> Do not use an [instrumentation key](../azure-monitor/app/separate-resources.md#about-resources-and-instrumentation-keys) and a [connection string](../azure-monitor/app/sdk-connection-string.md#overview) simultaneously. Whichever was set last will take precedence.
18
+
> You can use application settings to override host.json setting values without having to change the host.json file itself. This is helpful for scenarios where you need to configure or modify specific host.json settings for a specific environment. This also lets you change host.json settings without having to republish your project. To learn more, see the [host.json reference article](functions-host-json.md#override-hostjson-values). Changes to function app settings require your function app to be restarted.
22
19
23
20
## APPINSIGHTS_INSTRUMENTATIONKEY
24
21
25
-
The instrumentation key for Application Insights. Only use one of `APPINSIGHTS_INSTRUMENTATIONKEY`or`APPLICATIONINSIGHTS_CONNECTION_STRING`. When Application Insights runs in a sovereign cloud, use `APPLICATIONINSIGHTS_CONNECTION_STRING`. For more information, see [How to configure monitoring for Azure Functions](configure-monitoring.md).
22
+
The instrumentation key for Application Insights. Don't use both `APPINSIGHTS_INSTRUMENTATIONKEY`and`APPLICATIONINSIGHTS_CONNECTION_STRING`. When possible, use `APPLICATIONINSIGHTS_CONNECTION_STRING`. When Application Insights runs in a sovereign cloud, you must use `APPLICATIONINSIGHTS_CONNECTION_STRING`. For more information, see [How to configure monitoring for Azure Functions](configure-monitoring.md).
26
23
27
24
|Key|Sample value|
28
25
|---|------------|
@@ -32,7 +29,7 @@ The instrumentation key for Application Insights. Only use one of `APPINSIGHTS_I
32
29
33
30
## APPLICATIONINSIGHTS_CONNECTION_STRING
34
31
35
-
The connection string for Application Insights. Use `APPLICATIONINSIGHTS_CONNECTION_STRING` instead of `APPINSIGHTS_INSTRUMENTATIONKEY` in the following cases:
32
+
The connection string for Application Insights. When possible, use `APPLICATIONINSIGHTS_CONNECTION_STRING` instead of `APPINSIGHTS_INSTRUMENTATIONKEY`. Using `APPLICATIONINSIGHTS_CONNECTION_STRING` is required in the following cases:
36
33
37
34
+ When your function app requires the added customizations supported by using the connection string.
38
35
+ When your Application Insights instance runs in a sovereign cloud, which requires a custom endpoint.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-concurrency.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Using dynamic concurrency provides the following benefits:
43
43
44
44
### Dynamic concurrency configuration
45
45
46
-
Dynamic concurrency can be enabled at the host level in the host.json file. When, enabled any binding extensions used by your function app that support dynamic concurrency will adjust concurrency dynamically as needed. Dynamic concurrency settings override any manually configured concurrency settings for triggers that support dynamic concurrency.
46
+
Dynamic concurrency can be enabled at the host level in the host.json file. When, enabled any binding extensions used by your function app that support dynamic concurrency adjust concurrency dynamically as needed. Dynamic concurrency settings override any manually configured concurrency settings for triggers that support dynamic concurrency.
47
47
48
48
By default, dynamic concurrency is disabled. With dynamic concurrency enabled, concurrency starts at 1 for each function, and is adjusted up to an optimal value, which is determined by the host.
@@ -182,6 +190,12 @@ For more information about these settings, see [Sampling in Application Insights
182
190
| enableW3CDistributedTracing | true | Enables or disables support of W3C distributed tracing protocol (and turns on legacy correlation schema). Enabled by default if `enableHttpTriggerExtendedInfoCollection` is true. If `enableHttpTriggerExtendedInfoCollection` is false, this flag applies to outgoing requests only, not incoming requests. |
183
191
| enableResponseHeaderInjection | true | Enables or disables injection of multi-component correlation headers into responses. Enabling injection allows Application Insights to construct an Application Map to when several instrumentation keys are used. Enabled by default if `enableHttpTriggerExtendedInfoCollection` is true. This setting doesn't apply if `enableHttpTriggerExtendedInfoCollection` is false. |
184
192
193
+
### applicationInsights.dependencyTrackingOptions
194
+
195
+
|Property | Default | Description |
196
+
| --------- | --------- | --------- |
197
+
| enableSqlCommandTextInstrumentation | false | Enables collection of the full text of SQL queries, which is disabled by default. For more information on collecting SQL query text, see [Advanced SQL tracking to get full SQL query](../azure-monitor/app/asp-net-dependencies.md#advanced-sql-tracking-to-get-full-sql-query). |
198
+
185
199
### applicationInsights.snapshotConfiguration
186
200
187
201
For more information on snapshots, see [Debug snapshots on exceptions in .NET apps](../azure-monitor/app/snapshot-debugger.md) and [Troubleshoot problems enabling Application Insights Snapshot Debugger or viewing snapshots](../azure-monitor/app/snapshot-debugger-troubleshoot.md).
@@ -267,6 +281,24 @@ Configuration settings for a custom handler. For more information, see [Azure Fu
267
281
268
282
Configuration setting can be found in [bindings for Durable Functions](durable/durable-functions-bindings.md#host-json).
269
283
284
+
## concurrency
285
+
286
+
Enables dynamic concurrency for specific bindings in your function app. For more information, see [Dynamic concurrency](./functions-concurrency.md#dynamic-concurrency).
287
+
288
+
```json
289
+
{
290
+
"concurrency": {
291
+
"dynamicConcurrencyEnabled": true,
292
+
"snapshotPersistenceEnabled": true
293
+
}
294
+
}
295
+
```
296
+
297
+
|Property | Default | Description |
298
+
| --------- | --------- | --------- |
299
+
| dynamicConcurrencyEnabled | false | Enables dynamic concurrency behaviors for all triggers supported by this feature, which is off by default. |
300
+
| snapshotPersistenceEnabled | true | Learned concurrency values are periodically persisted to storage so new instances start from those values instead of starting from 1 and having to redo the learning. |
301
+
270
302
## eventHub
271
303
272
304
Configuration settings can be found in [Event Hub triggers and bindings](functions-bindings-event-hubs.md#host-json).
@@ -439,7 +471,7 @@ An array of one or more names of files that are monitored for changes that requi
439
471
440
472
## Override host.json values
441
473
442
-
There may be instances where you wish to configure or modify specific settings in a host.json file for a specific environment, without changing the host.json file itself. You can override specific host.json values by creating an equivalent value as an application setting. When the runtime finds an application setting in the format `AzureFunctionsJobHost__path__to__setting`, it overrides the equivalent host.json setting located at `path.to.setting` in the JSON. When expressed as an application setting, the dot (`.`) used to indicate JSON hierarchy is replaced by a double underscore (`__`).
474
+
There may be instances where you wish to configure or modify specific settings in a host.json file for a specific environment, without changing the host.json file itself. You can override specific host.json values by creating an equivalent value as an application setting. When the runtime finds an application setting in the format `AzureFunctionsJobHost__path__to__setting`, it overrides the equivalent host.json setting located at `path.to.setting` in the JSON. When expressed as an application setting, the dot (`.`) used to indicate JSON hierarchy is replaced by a double underscore (`__`).
443
475
444
476
For example, say that you wanted to disable Application Insight sampling when running locally. If you changed the local host.json file to disable Application Insights, this change might get pushed to your production app during deployment. The safer way to do this is to instead create an application setting as `"AzureFunctionsJobHost__logging__applicationInsights__samplingSettings__isEnabled":"false"` in the `local.settings.json` file. You can see this in the following `local.settings.json` file, which doesn't get published:
445
477
@@ -454,6 +486,8 @@ For example, say that you wanted to disable Application Insight sampling when ru
454
486
}
455
487
```
456
488
489
+
Overriding host.json settings using environment variables follows the ASP.NET Core naming conventions. When the element structure includes an array, the numeric array index should be treated as an additional element name in this path. For more information, see [Naming of environment variables](/aspnet/core/fundamentals/configuration/#naming-of-environment-variables).
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/asp-net-dependencies.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ For webpages, the Application Insights JavaScript SDK automatically collects AJA
91
91
## Advanced SQL tracking to get full SQL query
92
92
93
93
> [!NOTE]
94
-
> Azure Functions requires separate settings to enable SQL text collection. Within [host.json](../../azure-functions/functions-host-json.md#applicationinsights), set `"EnableDependencyTracking": true,` and `"DependencyTrackingOptions": { "enableSqlCommandTextInstrumentation": true }` in `applicationInsights`.
94
+
> Azure Functions requires separate settings to enable SQL text collection. For more information, see [Enable SQL query collection](../../azure-functions/configure-monitoring.md#enable-sql-query-collection).
95
95
96
96
For SQL calls, the name of the server and database is always collected and stored as the name of the collected `DependencyTelemetry`. Another field, called data, can contain the full SQL query text.
0 commit comments