AZ-204 - Developer associate - Monitor, Troubleshoot and Monitor
The content here is under the Attribution 4.0 International (CC BY 4.0) license
Azure offer different services to troubleshoot and monitor applications, it might vary based on the type of application you are building. Nevertheless, application insights could be of help to mitigate issues. In this section we will go through those services to better understand their purpose and what they do as well as tips that could be helpful while studying.
Application insights
- Concepts
- Application performance
- Monitor applications
- Diagnose issues
- Install a instrumentation package
- Monitored aspects
- Request rate
- Exceptions
- Page views
- User sessions count
- Performance of underlying machine
- Custom metrics written in the code
- Installation
- Visual studio
- creates a web mvc application
- From Project click on “Add Application Insights Telemetry”
- It can be install locally or use azure
- Visual studio
- Creating app insights
- telemetry is stored in a log workspace
- in dot net app, it stores the instrumentation key under Secrets.json file
- Insights allows dependency tracking from sql server
CLI
this section was not asked in any of the mock exams
Azure CLI offers a application insights extension (for the time being it is not official, but as this is a developer associate exam I thought it is worth to mention it here).
az monitor app-insights query --app myapp -g mygroup --analytics-query 'traces | where message contains "bla"' --start-time 2022-07-10T09:10:00.000Z -o table
For further reference, follow this issue created in the official github repository.
Tracking users
By default insights adds a random id from the user that, to corelate that with a actual user from an app, a custom metrics is needed. In c# (dotnet core) it is done extending the class TelemetryInitializeBase
Tracking page views
Can be done via javascript embedded in the html page
Application map
Draws a diagram based on the requests tracked by insights
Insights funnel
User flows
Availability
- URL ping
- Multi step test
Web site scale
https://docs.microsoft.com/en-us/azure/app-service/web-sites-scale
Web logic apps
Web logic app is an azure service that allows developers to integrate different services in the cloud. Some of the examples shared in the official documentation are:
- React to an event that happened in office 365
- Move uploaded files from an SFTP or FTP server to Azure Storage.
- Monitor tweets
Caching
Cache-Aside
CDN
The caching behaviors that are offered by azure are something to keep in mind while preparing for the exam.
- Bypass cache
- Override
- Set if missing
CDN settings
- Ignore query string
- Bypass caching for query string
- Cache every unique URL
Azure cache for redis
- Managed redis
- Pricing?
- Redis package for c#: StackExchange.Redis
- Integrating azure cache with c#
Caching rules
- Bypass cache
- Default
- Override
- Set if missing/cosmos
Front door
Azure front door is a CDN service that provides the deliver of large file sizes without cap on file size.
Front door supports different mime types as well as compression. The full list is available under Microsoft’s official front door documentation.
Purge caching
- Single path value
- Wildcard purge
- Root domain purge
Table of contents
Got a question?
If you have question or feedback, don't think twice and click here to leave a comment. Just want to support me? Buy me a coffee!