Skip to content

Commit d713489

Browse files
authored
[App Configuration] Add troubleshooting guide (Azure#25364)
1 parent d93eda8 commit d713489

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Troubleshooting App Configuration issues
2+
3+
This troubleshooting guide covers failure investigation techniques, common errors for the credential types in the Azure
4+
App Configuration JavaScript client library, and mitigation steps to resolve these errors.
5+
6+
## Table of Contents
7+
8+
* [General Troubleshooting](#general-troubleshooting)
9+
* [Enable client logging](#enable-client-logging)
10+
* [Authentication issues](#authentication-issues)
11+
* [Limit issues](#limit-issues)
12+
* [Get additional help](#get-additional-help)
13+
14+
## General Troubleshooting
15+
16+
### Enable client logging
17+
18+
To troubleshoot issues with Azure App Configuration library, it is important to first enable logging to monitor the
19+
behavior of the application. The errors and warnings in the logs generally provide useful insights into what went wrong
20+
and sometimes include corrective actions to fix issues. The Azure SDK client libraries for JavaScript allow you to enable logging with one of the following approaches:
21+
22+
- Through the `AZURE_LOG_LEVEL` environment variable
23+
- At runtime by calling `setLogLevel` in the `@azure/logger` package
24+
25+
#### Logging via environment variable
26+
27+
To see a log of HTTP requests and responses:
28+
29+
Set the `AZURE_LOG_LEVEL` environment variable to `info`:
30+
31+
```text
32+
// Windows
33+
set AZURE_LOG_LEVEL = info
34+
// Linux based
35+
export AZURE_LOG_LEVEL = info
36+
```
37+
38+
#### Logging using setLogLevel
39+
40+
Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
41+
42+
```ts
43+
import { setLogLevel } from "@azure/logger";
44+
45+
setLogLevel("info");
46+
```
47+
48+
**NOTE**: When logging the body of request and response, ensure they don't contain confidential information. We already sanitize headers like `Authorization` that contain secrets.
49+
50+
For detailed instructions on how to enable logs, see the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
51+
52+
### Authentication issues
53+
54+
In addition to connection strings, Azure App Configuration supports [role-based access control](https://learn.microsoft.com/azure/role-based-access-control/overview) (RBAC) using Azure Active Directory authentication. You can use the `@azure/identity` dependency to provide a valid credential. For more details on getting started, see the [README](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration) of Azure App Configuration library.
55+
56+
#### Permission issues
57+
58+
Calls to service clients resulting in an error with HTTP code 401 or 403 often indicate the caller doesn't have sufficient permissions for the specified API. Check the service documentation to determine which RBAC roles are needed for the specific request, and ensure the authenticated user or service principal has been granted the appropriate roles on the resource. More information on App Configuration roles can be found [here](https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac#azure-built-in-roles-for-azure-app-configuration).
59+
60+
For more help with troubleshooting authentication errors, see the Azure Identity client library [troubleshooting guide](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/TROUBLESHOOTING.md).
61+
62+
### Limit Issues
63+
Azure App Configuration service methods throw a RestError or its subclass on failure. The error thrown by the App Configuration client library includes a detailed response error object that provides specific useful insights into what went wrong and includes corrective actions to fix common issues. A common error encountered is HTTP status code 429 for exceeding the limit. Refer to the body of the 429 response for the specific reason why the request failed. The failures often happen under these circumstances:
64+
65+
* Exceeding the daily request limit for a store in the Free tier.
66+
* Exceeding the hourly request limit for a store in the standard tier.
67+
* Momentary throttling due to a large burst of requests†.
68+
* Excessive bandwidth usage.
69+
* Attempting to create or modify a key when the storage quota is exceeded.
70+
71+
To reduce number of requests made to App Configuration service, please check out [this guide](https://learn.microsoft.com/azure/azure-app-configuration/howto-best-practices#reduce-requests-made-to-app-configuration).
72+
73+
## Get additional help
74+
75+
Additional information on ways to reach out for support can be found in the [FAQ](https://learn.microsoft.com/azure/azure-app-configuration/faq) for Azure App Configuration service and common best practice samples can be found in [Best Practice Samples](https://learn.microsoft.com/azure/azure-app-configuration/howto-best-practices).

0 commit comments

Comments
 (0)