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-monitor/app/azure-web-apps-python.md
+23-9Lines changed: 23 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,14 +130,30 @@ In order to use the OpenTelemetry Django Instrumentation, you need to set the `D
130
130
131
131
## Troubleshooting
132
132
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.
134
134
135
-
### Step 1: Confirm that App Service autoinstrumentation is enabled
135
+
### Duplicate telemetry
136
136
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.
138
138
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.
141
157
142
158
Confirm that `AgentInitializedSuccessfully` is set to true and `IKey` to have a valid iKey.
143
159
@@ -158,11 +174,9 @@ Here's an example JSON file:
158
174
159
175
```
160
176
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.
164
178
165
-
### Step 4: Confirm Django settings are configured
179
+
### Django apps
166
180
167
181
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.
0 commit comments