Skip to content

Commit 30e85a7

Browse files
committed
Reordered troubleshooting section
1 parent 458739d commit 30e85a7

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

articles/azure-monitor/app/azure-web-apps-python.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,30 @@ In order to use the OpenTelemetry Django Instrumentation, you need to set the `D
130130

131131
## Troubleshooting
132132

133-
Here we provide our step-by-step troubleshooting guide for monitoring Python applications on Azure App Services using autoinstrumentation.
133+
Here we provide our troubleshooting guide for monitoring Python applications on Azure App Services using autoinstrumentation.
134134

135-
### Step 1: Confirm that App Service autoinstrumentation is enabled
135+
### Duplicate telemetry
136136

137-
Check that `ApplicationInsightsAgent_EXTENSION_VERSION` app setting is set to a value of `~3`.
137+
You should only use autoinstrumentation on App Service if you are not using manual instrumentation of OpenTelemetry in your code, such as the [Azure Monitor OpenTelemetry Distro](./opentelemetry-enable.md) or the [Azure Monitor OpenTelemetry Exporter][azure_monitor_opentelemetry_exporter]. Using autoinsturmentation on top of the manual instrumentation could cause duplicate telemetry and increase your cost. In order to use App Service OpenTelemetry autoinstrumentaion, first remove manual instrumentation of OpenTelemetry from your code.
138138

139-
### Step 2: Check autoinstrumentation diagnostics and status logs
140-
Navigate to */var/log/applicationinsights/* and open *status.json*.
139+
### Missing telemetry
140+
141+
If you are missing telemetry, follow these steps to see confirm autoinstrumentation is enabled correctly.
142+
143+
#### Step 1: Check the Application Insights blade on your App Service resource
144+
145+
Confirm that autoinstrumentation is enabled in the Application Insights blade on your App Service Resource:
146+
147+
:::image type="content"source="./media/azure-web-apps/enable.png" alt-text="Screenshot of Application Insights tab with enable selected." lightbox="./media/azure-web-apps/enable.png":::
148+
149+
#### Step 2: Confirm that your App Settings are correct
150+
151+
Confirm that the `ApplicationInsightsAgent_EXTENSION_VERSION` app setting is set to a value of `~3` and that your `APPLICATIONINSIGHTS_CONNECTION_STRING` points to the appropiate Application Insights resource.
152+
153+
:::image type="content"source="./media/azure-web-apps-python/application-settings-python.png" alt-text="Screenshot of App Service Application Settings with available Application Insights settings." lightbox="./media/azure-web-apps-python/application-settings-python.png":::
154+
155+
#### Step 3: Check autoinstrumentation diagnostics and status logs
156+
Navigate to */var/log/applicationinsights/* and open status_*.json.
141157

142158
Confirm that `AgentInitializedSuccessfully` is set to true and `IKey` to have a valid iKey.
143159

@@ -158,11 +174,9 @@ Here's an example JSON file:
158174

159175
```
160176

161-
### Step 3: Avoid duplicate telemetry
162-
163-
You should only use autoinstrumentation on App Service if you are not using manual instrumentation of OpenTelemetry in your code, such as the [Azure Monitor OpenTelemetry Distro](./opentelemetry-enable.md) or the [Azure Monitor OpenTelemetry Exporter][azure_monitor_opentelemetry_exporter]. Using Autoinsturmentation on top of the manual instrumentation could cause duplicate telemetry and increase your cost. In order to use OpenTelemetry Autoinstrumentaion on App Service, first remove the Azure Monitor OpenTelemetry Distro from your app.
177+
The `applicationinsights-extension.log` in the same folder may show other helpful diagnostics.
164178

165-
### Step 4: Confirm Django settings are configured
179+
### Django apps
166180

167181
If your app uses Django and is either failing to start or using incorrect settings, make sure to set the `DJANGO_SETTINGS_MODULE` environment variable. See the [Django Instrumentation](#django-instrumentation) section for details.
168182

0 commit comments

Comments
 (0)