AZ-305 ยท Logging and monitoring design
Metrics vs logs in Azure Monitor
Azure Monitor data types (platform metrics, resource logs, activity log, Microsoft Entra logs), where each is stored by default, retention defaults and which one to use for a requirement.
Key points
- Platform metrics: numeric time series in Azure Monitor Metrics; automatic, free to store, kept 93 days; fast alerting.
- Logs: records in a Log Analytics workspace, queried with KQL; root-cause analysis.
- Activity log (control plane): automatic, kept 90 days.
- Resource logs (data plane): need a diagnostic setting.
- Microsoft Entra sign-in and audit logs: Entra diagnostic settings to a workspace, storage or Event Hubs.
Source: https://learn.microsoft.com/en-us/azure/azure-monitor/fundamentals/data-sources
Practice questions
For how long does Azure Monitor keep platform metrics in its metrics database by default?
- 30 days
- 90 days
- 93 days
- 365 days
Show answer
Answer: C. 93 days
Platform and custom metrics are stored for 93 days. The 90-day figure belongs to the activity log, a common mix-up; longer metric history requires routing metrics to a Log Analytics workspace.
Which monitoring data does Azure collect for an Azure resource with no configuration at all?
- Platform metrics
- Activity log entries
- Resource logs
- Windows event logs from the guest OS
- Application request telemetry
Show answer
Answer: A. Platform metrics, B. Activity log entries
Platform metrics and the activity log are collected automatically. Resource logs need a diagnostic setting, guest OS event logs need Azure Monitor Agent with a data collection rule, and request telemetry needs Application Insights to be enabled.
As soon as you create a key vault, its resource logs (for example, secret reads) start flowing into a Log Analytics workspace automatically.
Show answer
Answer: False
False. Resource logs are not collected by default. You must create a diagnostic setting that selects the log categories and a destination before any data-plane events are kept.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
