You want to create a log-based metric to count errors from your application logs. Which TWO resources are required? (Select 2)
In Cloud Logging, a logs-based metric is created by defining a filter that selects which log entries increment the metric's counter. This filter is the heart of the metric because it evaluates each incoming log entry against conditions such as severity >= ERROR or a text payload match. Without it, the metric has no way to distinguish error logs from other entries, so the filter directly determines the metric's value and is therefore required.
Why this answer
You need a filter to match error logs and a metric descriptor that defines the metric type.