Monitoring And logging in Azure Cheatsheets
Monitoring And logging in Azure Cheatsheets
By Saeed Salehi
2 min read
- Authors
- Name
- Saeed Salehi
- linkedinSaeed Salehi
- twitter@1saeedsalehi
- Github
- github1saeedsalehi
- Website
- websiteBlog
Part of series
Developing Solutions for Microsoft Azure (AZ-204) certification exam Cheatsheets
- Part 1:
Introduction to (AZ-204) certification exam Cheatsheets
- Part 2:
Implement IaaS in Azure Cheatsheets
- Part 3:
Azure Functions Cheatsheets
- Part 4:
Azure App Service Cheatsheets
- Part 5:
Develop solutions that use Blob storage Cheatsheets
- Part 6:
Develop solutions that use Azure Cosmos DB Cheatsheets
- Part 7:
Implement Azure Security Cheatsheet
- Part 8:
Microsoft Identity platform Cheatsheet
- Part 9:
Monitoring And logging in Azure Cheatsheets
- Part 10:
Azure Cache for Redis Cheatsheets
- Part 11:
Develop message-based solutions Cheatsheets
- Part 12:
Develop event-based solutions Cheatsheets
- Part 13:
API Management in Azure Cheatsheets
- Metrics
- Logs
- Distributed traces
- Changes
Application Insights
- Request rates, response times, and failure rates
- Dependency rates, response times, and failure rates
- Exceptions
- Page views and load performance
- Performance counters
- Host diagnostics
- Diagnostic trace logs
- Custom events and metrics
Ways to get started monitoring and analyzing app performance:
- At run time: without change in code
- At development time: add to code
- Instrument your web pages (client-side telemetry)
- Analyze mobile app usage (Visual Studio App Center)
- Availability tests: ping regularly from azure servers
log-based metrics
- log-based metrics: Kusto queries from stored events (require processing to produce the result)
- Standard metrics: pre-aggregated time series. (near real time)
Availability test
Up to 100 availability tests per Application Insights resource
- URL ping test (classic): relies on the DNS infrastructure of the public internet
- Standard test (Preview):
- Custom TrackAvailability test: use
TrackAvailability()
method to send data to Application Insight - Multi-step test: Only available from visual studio , multi request or authentication test scenarios (Custom TrackAvailability works as well)
Application Map
Troubleshoot app performance
- Components are different from "observed" external dependencies such as SQL, Event Hubs, etc. which your team/organization may not have access to (code or telemetry).
- Components run on any number of server/role/container instances.
- Components can be separate Application Insights instrumentation keys (even if subscriptions are different) or different roles reporting to a single Application Insights instrumentation key.
Progressive discovery of the components
Alert type
Metric alert: Metric data is stored in the system already pre-computed. Metric alerts are useful when you want to be alerted about data that requires little or no manipulation. We recommend using metric alerts if the data you want to monitor is available in metric data. (stateful - only notifying once when alert is fired and once when alert is resolved)
Log alert: Log alerts allow you to perform advanced logic operations on your data. (KQL for data manipulation using log alerts).
Activity Log alert: Activity logs provide auditing of all actions that occurred on resources. Use activity log alerts to be alerted when a specific event happens to a resource, for example, a restart, a shutdown, or the creation or deletion of a resource. (Stateless)
Prometheus alerts (preview): Prometheus alerts are primarily used for alerting on performance and health of Kubernetes clusters (including AKS).