Skip to content

Commit 78f2243

Browse files
committed
docs: move live app troubleshooting information to its own page
The existing one was getting pretty long.
1 parent 5643759 commit 78f2243

File tree

3 files changed

+47
-48
lines changed

3 files changed

+47
-48
lines changed

docs/configuration/environment-variables.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ The log level used in the application's logging configuration.
113113

114114
By default the application sends logs to `stdout`.
115115

116-
117116
### `DJANGO_MIGRATIONS_DIR`
118117

119118
!!! warning "Deployment configuration"
@@ -167,9 +166,8 @@ devcontainer, check the [`DJANGO_LOCAL_PORT`](#django_local_port).
167166

168167
[Azure Monitor connection strings](https://docs.microsoft.com/en-us/azure/azure-monitor/app/sdk-connection-string)
169168

170-
Enables [log collection](../../deployment/infrastructure/#logs). Set the value in quotes, e.g. `APPLICATIONINSIGHTS_CONNECTION_STRING="InstrumentationKey=…"`.
169+
Enables [log collection](../../deployment/troubleshooting/#logs). Set the value in quotes, e.g. `APPLICATIONINSIGHTS_CONNECTION_STRING="InstrumentationKey=…"`.
171170

172171
[app-service-config]: https://docs.microsoft.com/en-us/azure/app-service/configure-common?tabs=portal
173172
[benefits-secrets]: https://github.com/cal-itp/benefits-secrets
174-
[deployment]: ../deployment/README.md
175173
[getting-started_create-env]: ../getting-started/README.md#create-an-environment-file

docs/deployment/infrastructure.md

-45
Original file line numberDiff line numberDiff line change
@@ -88,51 +88,6 @@ You'll see these referenced in Terraform as [data sources](https://developer.has
8888

8989
For browsing the [Azure portal](https://portal.azure.com), [switching your `Default subscription filter`](https://docs.microsoft.com/en-us/azure/azure-portal/set-preferences) to only `CDT/ODI Production` is recommended.
9090

91-
## Monitoring
92-
93-
We have [ping tests](https://docs.microsoft.com/en-us/azure/azure-monitor/app/monitor-web-app-availability) set up to notify about availability of the dev, test, and prod deployments. Alerts go to [#benefits-notify](https://cal-itp.slack.com/archives/C022HHSEE3F).
94-
95-
## Logs
96-
97-
Logs can be found a couple of places:
98-
99-
### Azure App Service Logs
100-
101-
[Open the `Logs` for the slot you are interested in.](https://docs.google.com/document/d/11EPDIROBvg7cRtU2V42c6VBxcW_o8HhcyORALNtL_XY/edit#heading=h.6pxjhslhxwvj) The following tables are likely of interest:
102-
103-
- `AppServiceConsoleLogs`: `stdout` and `stderr` coming from the container
104-
- `AppServiceHTTPLogs`: requests coming through App Service
105-
- `AppServicePlatformLogs`: deployment information
106-
107-
For some pre-defined queries, click `Queries`, then `Group by: Query type`, and look under `Query pack queries`.
108-
109-
### [Azure Monitor Logs](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/data-platform-logs)
110-
111-
[Open the `Logs` for the slot you are interested in.](https://docs.google.com/document/d/11EPDIROBvg7cRtU2V42c6VBxcW_o8HhcyORALNtL_XY/edit#heading=h.n0oq4r1jo7zs)
112-
113-
The following [tables](https://docs.microsoft.com/en-us/azure/azure-monitor/app/opencensus-python#telemetry-type-mappings) are likely of interest:
114-
115-
- `requests`
116-
- `traces`
117-
118-
In the latter two, you should see recent log output. Note [there is some latency](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/data-ingestion-time).
119-
120-
See [`Failures`](https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-exceptions#diagnose-failures-using-the-azure-portal) in the sidebar (or `exceptions` under `Logs`) for application errors/exceptions.
121-
122-
### Live tail
123-
124-
After [setting up the Azure CLI](#making-changes), you can use the following command to [stream live logs](https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs#in-local-terminal):
125-
126-
```sh
127-
az webapp log tail --resource-group RG-CDT-PUB-VIP-CALITP-P-001 --name AS-CDT-PUB-VIP-CALITP-P-001 --slot dev 2>&1 | grep -v /healthcheck
128-
```
129-
130-
`--slot dev` can be removed for production or changed for a different slot.
131-
132-
### SCM
133-
134-
https://as-cdt-pub-vip-calitp-p-001-dev.scm.azurewebsites.net/api/logs/docker
135-
13691
## Making changes
13792

13893
[![Build Status](https://calenterprise.visualstudio.com/CDT.OET.CAL-ITP/_apis/build/status/cal-itp.benefits%20Infra?branchName=dev)](https://calenterprise.visualstudio.com/CDT.OET.CAL-ITP/_build/latest?definitionId=828&branchName=dev)

docs/deployment/troubleshooting.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Troubleshooting
2+
3+
## Monitoring
4+
5+
We have [ping tests](https://docs.microsoft.com/en-us/azure/azure-monitor/app/monitor-web-app-availability) set up to notify about availability of the dev, test, and prod deployments. Alerts go to [#benefits-notify](https://cal-itp.slack.com/archives/C022HHSEE3F).
6+
7+
## Logs
8+
9+
Logs can be found a couple of places:
10+
11+
### Azure App Service Logs
12+
13+
[Open the `Logs` for the slot you are interested in.](https://docs.google.com/document/d/11EPDIROBvg7cRtU2V42c6VBxcW_o8HhcyORALNtL_XY/edit#heading=h.6pxjhslhxwvj) The following tables are likely of interest:
14+
15+
- `AppServiceConsoleLogs`: `stdout` and `stderr` coming from the container
16+
- `AppServiceHTTPLogs`: requests coming through App Service
17+
- `AppServicePlatformLogs`: deployment information
18+
19+
For some pre-defined queries, click `Queries`, then `Group by: Query type`, and look under `Query pack queries`.
20+
21+
### [Azure Monitor Logs](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/data-platform-logs)
22+
23+
[Open the `Logs` for the slot you are interested in.](https://docs.google.com/document/d/11EPDIROBvg7cRtU2V42c6VBxcW_o8HhcyORALNtL_XY/edit#heading=h.n0oq4r1jo7zs)
24+
25+
The following [tables](https://docs.microsoft.com/en-us/azure/azure-monitor/app/opencensus-python#telemetry-type-mappings) are likely of interest:
26+
27+
- `requests`
28+
- `traces`
29+
30+
In the latter two, you should see recent log output. Note [there is some latency](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/data-ingestion-time).
31+
32+
See [`Failures`](https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net-exceptions#diagnose-failures-using-the-azure-portal) in the sidebar (or `exceptions` under `Logs`) for application errors/exceptions.
33+
34+
### Live tail
35+
36+
After [setting up the Azure CLI](#making-changes), you can use the following command to [stream live logs](https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs#in-local-terminal):
37+
38+
```sh
39+
az webapp log tail --resource-group RG-CDT-PUB-VIP-CALITP-P-001 --name AS-CDT-PUB-VIP-CALITP-P-001 --slot dev 2>&1 | grep -v /healthcheck
40+
```
41+
42+
`--slot dev` can be removed for production or changed for a different slot.
43+
44+
### SCM
45+
46+
https://as-cdt-pub-vip-calitp-p-001-dev.scm.azurewebsites.net/api/logs/docker

0 commit comments

Comments
 (0)