Skip to content

Commit 2edf151

Browse files
committed
add more example logs, change wording of table and opening paragraph
1 parent 049d9c9 commit 2edf151

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

articles/azure-app-configuration/enable-dynamic-configuration-aspnet-core.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,23 +230,30 @@ The configuration refresh is triggered by the incoming requests to your web app.
230230

231231
![Launching updated quickstart app locally](./media/quickstarts/aspnet-core-app-launch-local-after.png)
232232

233-
## Monitoring and Troubleshooting
233+
## Monitoring and Troubleshooting (v6.0.0 and later)
234234

235-
Logs are output upon configuration refresh and contain detailed information on changes to key-values in your App Configuration store and your application.
235+
Logs are output upon configuration refresh and contain detailed information on key-values retrieved from your App Configuration store and configuration changes made to your application.
236236

237237
- A default `ILoggerFactory` is added automatically when `services.AddAzureAppConfiguration()` is invoked in your `ConfigureServices` method. The App Configuration provider uses this `ILoggerFactory` to create an instance of `ILogger`, which outputs these logs. No code changes are needed.
238238
- Logs are output at different log levels. The default level is `Information`.
239239

240240
| Log Level | Description |
241241
|---|---|
242242
| Debug | This log level is used for monitoring changes to key-values in your App Configuration store. Logs include the key and label of key-values updated in the App Configuration store. Depending on the content type, logs may also include the App Configuration store endpoint requested and whether the key-value was modified or deleted. |
243-
| Information | This log level is used for monitoring changes to your app's configuration. Logs include the keys of settings in the configuration that have been updated. |
244-
| Warning | This log level is used for identifying issues that occurred during refresh. Logs include the exception name and a message containing a brief description of the issue. |
243+
| Information | Logs include the keys of configuration settings updated during a configuration refresh. Values of configuration settings are omitted from the log to avoid leaking sensitive data. You can monitor logs at this level to ensure your application picks up expected configuration changes. |
244+
| Warning | Logs include failures and exceptions that occurred during configuration refresh. Occasional occurrences can be ignored because the configuration provider library will continue to use the cached data and attempt to refresh the configuration next time. You can monitor logs at this level for repetitive warnings that may indicate potential issues. For example, you rotated the connection string but forgot to update your application. |
245245
- The logging category is `Microsoft.Extensions.Configuration.AzureAppConfiguration.Refresh`, which appears before each log.
246-
- Here is an example `Information` level log:
246+
- Here are some example logs at each log level:
247247
```console
248+
dbug: Microsoft.Extensions.Configuration.AzureAppConfiguration.Refresh[0]
249+
Key-value read from App Configuration. Change:'Modified' Key:'ExampleKey' Label:'ExampleLabel' Endpoint:'https://examplestore.azconfig.io'
250+
248251
info: Microsoft.Extensions.Configuration.AzureAppConfiguration.Refresh[0]
249-
Setting updated from Key Vault. Key:'ExampleKey'
252+
Setting updated. Key:'ExampleKey'
253+
254+
warn: Microsoft.Extensions.Configuration.AzureAppConfiguration.Refresh[0]
255+
A refresh operation failed.
256+
Service request failed.
250257
```
251258

252259
Using `ILogger` is the preferred method and is prioritized as the logging source if an instance of `ILoggerFactory` is present. However, if `ILoggerFactory` is not available, logs can alternatively be enabled and configured through the [instructions for .NET Core apps](./enable-dynamic-configuration-dotnet-core.md#monitoring-and-troubleshooting). For more information on how to utilize these logs, follow the instructions for [logging in .NET Core and ASP.NET Core](/aspnet/core/fundamentals/logging).

articles/azure-app-configuration/enable-dynamic-configuration-dotnet-core.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,22 +140,29 @@ Calling the `ConfigureRefresh` method alone won't cause the configuration to ref
140140
> [!NOTE]
141141
> Since the cache expiration time was set to 10 seconds using the `SetCacheExpiration` method while specifying the configuration for the refresh operation, the value for the configuration setting will only be updated if at least 10 seconds have elapsed since the last refresh for that setting.
142142

143-
## Monitoring and Troubleshooting
143+
## Monitoring and Troubleshooting (v6.0.0 and later)
144144

145-
Logs are output upon configuration refresh and contain detailed information on changes to key-values in your App Configuration store and your application. You can enable these logs using the instructions for [logging with the Azure SDK for .NET](/dotnet/azure/sdk/logging).
145+
Logs are output upon configuration refresh and contain detailed information on key-values retrieved from your App Configuration store and configuration changes made to your application. You can enable these logs using the instructions for [logging with the Azure SDK for .NET](/dotnet/azure/sdk/logging).
146146

147147
- Logs are output at different log levels. The default level is `Informational`.
148148

149149
| Log Level | Description |
150150
|---|---|
151151
| Verbose | This log level is used for monitoring changes to key-values in your App Configuration store. Logs include the key and label of key-values updated in the App Configuration store. Depending on the content type, logs may also include the App Configuration store endpoint requested and whether the key-value was modified or deleted. |
152-
| Informational | This log level is used for monitoring changes to your app's configuration. Logs include the keys of settings in the configuration that have been updated. |
153-
| Warning | This log level is used for identifying issues that occurred during refresh. Logs include the exception name and a message containing a brief description of the issue. |
152+
| Informational | Logs include the keys of configuration settings updated during a configuration refresh. Values of configuration settings are omitted from the log to avoid leaking sensitive data. You can monitor logs at this level to ensure your application picks up expected configuration changes. |
153+
| Warning | Logs include failures and exceptions that occurred during configuration refresh. Occasional occurrences can be ignored because the configuration provider library will continue to use the cached data and attempt to refresh the configuration next time. You can monitor logs at this level for repetitive warnings that may indicate potential issues. For example, you rotated the connection string but forgot to update your application. |
154154
- The logging category is `Microsoft-Extensions-Configuration-AzureAppConfiguration-Refresh`, which appears before each log.
155-
- Here is an example `Informational` level log:
155+
- Here are some example logs at each log level:
156156
```console
157+
[Verbose] Microsoft-Extensions-Configuration-AzureAppConfiguration-Refresh:
158+
Key-value read from App Configuration. Change:'Modified' Key:'ExampleKey' Label:'ExampleLabel' Endpoint:'https://examplestore.azconfig.io'
159+
157160
[Informational] Microsoft-Extensions-Configuration-AzureAppConfiguration-Refresh:
158-
Setting updated from Key Vault. Key:'ExampleKey'
161+
Setting updated. Key:'ExampleKey'
162+
163+
[Warning] Microsoft-Extensions-Configuration-AzureAppConfiguration-Refresh:
164+
A refresh operation failed.
165+
Service request failed.
159166
```
160167

161168
## Clean up resources

0 commit comments

Comments
 (0)