0
0
Azurecloud~20 mins

App Service diagnostics and logging in Azure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
App Service Logging Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Enable Application Logging for Azure App Service
You run the following Azure CLI command to enable application logging for your App Service. What is the expected output?
Azure
az webapp log config --name MyAppService --resource-group MyResourceGroup --application-logging true
A
{
  "applicationLogs": {
    "fileSystem": {
      "level": "Information"
    }
  },
  "detailedErrorMessages": null,
  "failedRequestsTracing": null,
  "httpLogs": null
}
B
{
  "applicationLogs": {
    "fileSystem": {
      "level": "Error"
    }
  }
}
CERROR: The command requires a log level to be specified when enabling application logging.
DCommandNotFoundError: az webapp log config is not recognized
Attempts:
2 left
💡 Hint
Check if the command requires a log level parameter when enabling application logging.
🧠 Conceptual
intermediate
1:30remaining
Purpose of Failed Request Tracing in App Service
What is the main purpose of enabling Failed Request Tracing in Azure App Service diagnostics?
ATo capture detailed logs of HTTP requests that fail, helping diagnose issues like 404 or 500 errors.
BTo automatically restart the App Service when a failure occurs.
CTo increase the maximum number of concurrent connections allowed.
DTo enable real-time monitoring of CPU and memory usage.
Attempts:
2 left
💡 Hint
Think about what 'failed request' means in web applications.
Troubleshoot
advanced
2:00remaining
Diagnosing Missing Logs in Azure App Service
You enabled application logging to the file system on your Azure App Service, but no logs appear in the LogFiles directory. What could be the cause?
AThe Azure CLI command to enable logging was run without specifying the resource group.
BThe application logging level is set to Verbose, which disables logs.
CThe LogFiles directory is only created when HTTP logging is enabled.
DThe App Service plan is on a Free tier, which does not support file system logging.
Attempts:
2 left
💡 Hint
Consider the limitations of different App Service plans.
🔀 Workflow
advanced
2:30remaining
Order of Steps to Enable and View HTTP Logs in Azure App Service
Arrange the steps in the correct order to enable HTTP logging and view the logs for an Azure App Service.
A3,1,2,4
B1,3,2,4
C1,2,3,4
D2,1,3,4
Attempts:
2 left
💡 Hint
Think about enabling logging before generating traffic and then accessing logs.
Best Practice
expert
3:00remaining
Best Practice for Retaining Logs in Azure App Service
What is the best practice to ensure long-term retention and analysis of logs generated by Azure App Service?
ASend logs to Azure Blob Storage or Azure Monitor for centralized storage and analysis.
BEnable file system logging and rely on the default retention period.
CConfigure streaming logs only and monitor them live without saving.
DManually download logs daily from the LogFiles directory.
Attempts:
2 left
💡 Hint
Think about scalable, automated log storage solutions.