Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get traffic logs to appear for Azure apps #631

Closed
Tracked by #615
afeld opened this issue Jun 1, 2022 · 4 comments · Fixed by #719
Closed
Tracked by #615

Get traffic logs to appear for Azure apps #631

afeld opened this issue Jun 1, 2022 · 4 comments · Fixed by #719
Assignees
Labels
bug Something isn't working infrastructure Terraform, Azure, etc.

Comments

@afeld
Copy link
Contributor

afeld commented Jun 1, 2022

User story: As a developer on the Benefits app, I need to see logs appear for the Benefits app to help with troubleshooting.

To Reproduce

There are various places to see (and various ways to configure?) logs in Azure. Click into each of the following:

All seem to be empty, or at least not showing as much as I would expect.

Expected behavior

I expect to see logs similar to what appears locally when running the server, e.g.

[01/Jun/2022 00:07:43] INFO django.server:161 "GET /abc HTTP/1.1" 200 9414

Additional context

@afeld afeld added the bug Something isn't working label Jun 1, 2022
@afeld afeld self-assigned this Jun 1, 2022
@thekaveman
Copy link
Member

I'm under the impression this is a permissions thing. I traded a few emails with DevSecOps regarding the dev subscription logs; when we screenshared they were able to see what you're describing using the (Diagnostic?) logs (specifically the AppServiceConsoleLogs option there). But it shows up blank for me.

@thekaveman thekaveman moved this to Backlog in Digital Services Jun 1, 2022
@afeld afeld added the infrastructure Terraform, Azure, etc. label Jun 2, 2022
@afeld afeld assigned thekaveman and unassigned afeld Jun 3, 2022
@afeld afeld moved this from Backlog to In Progress in Digital Services Jun 3, 2022
@thekaveman
Copy link
Member

I can query AppServiceHTTPLogs
from the Logs interface and get results for actual app traffic:

AppServiceHTTPLogs 
| where CsUriStem != "/healthcheck" and UserAgent != "AlwaysOn"

image

I cannot see AppServiceConsoleLogs from the same interface (this should be stdout and stderr from our container, so everything):

AppServiceConsoleLogs

image

Asked @cal-itp/cdt-devsecops team about this, they are looking into permissions/settings etc.

@thekaveman thekaveman added this to the Hosting migration milestone Jun 6, 2022
@thekaveman thekaveman moved this from In Progress to Blocked in Digital Services Jun 8, 2022
@thekaveman
Copy link
Member

This article talks about Configuring a custom container for Azure App Service (which is our use-case).

The section on Access Diagnostic Logs says:

You can access the console logs generated from inside the container.

First, turn on container logging by running the following command:

az webapp log config --name <app-name> --resource-group <resource-group-name> --docker-container-logging filesystem

Try this configuration next.

@thekaveman
Copy link
Member

I don't have permissions to run this command. Sent to @cal-itp/cdt-devsecops team to see if they can run it.

@afeld afeld moved this from Blocked to In Progress in Digital Services Jun 17, 2022
@afeld afeld assigned afeld and unassigned thekaveman Jun 17, 2022
@afeld afeld mentioned this issue Jun 22, 2022
1 task
Repository owner moved this from In Progress to Done in Digital Services Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working infrastructure Terraform, Azure, etc.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants