Question 163 of 500
Managing application performance monitoringmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is to create a log-based metric using the Logs Explorer, then set up an alerting policy. This is correct because log-based metrics in Cloud Logging allow you to define a counter that increments each time a log entry matches a specific filter—such as severity=ERROR—without writing any custom code. Once the metric is created, Cloud Monitoring can alert you when the count exceeds a defined threshold, providing a native, serverless solution that keeps all observability within Google Cloud. On the Google Professional Cloud Developer exam, this scenario tests your understanding of how to transform raw log data into actionable signals without exporting to external systems; a common trap is trying to use Logs Explorer alone for alerting or writing custom scripts to count logs. Remember the two-step rule: filter first in Logs Explorer to create the metric, then alert in Cloud Monitoring. A helpful mnemonic is "Log it, then watch it"—the metric is the bridge between logging and monitoring.

PCD Managing application performance monitoring Practice Question

This PCD practice question tests your understanding of managing application performance monitoring. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Your application writes structured logs to Cloud Logging. You want to create a metric that counts log entries with a specific severity level, then alert when the count exceeds a threshold. What should you do?

Question 1mediummultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a log-based metric using the Logs Explorer, then set up an alerting policy.

Option C is correct because log-based metrics in Cloud Logging allow you to define a counter metric based on log entries matching a filter (e.g., severity=ERROR). Once the metric is created, you can set up an alerting policy in Cloud Monitoring to trigger when the count exceeds a threshold. This approach is native, serverless, and requires no custom code or external exports.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use Cloud Monitoring's custom metrics API to write the count.

    Why it's wrong here

    While possible, it requires application code changes and is more complex than using built-in log-based metrics, which are the recommended approach.

  • Export logs to BigQuery and analyze there.

    Why it's wrong here

    Exporting to BigQuery is for long-term analysis, not for real-time alerting; you would need additional tools to monitor counts.

  • Create a log-based metric using the Logs Explorer, then set up an alerting policy.

    Why this is correct

    Logs Explorer allows you to define a metric from a query (e.g., count of 'ERROR' severity), which then becomes available in Cloud Monitoring for alerting.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use Cloud Logging's metrics dashboard.

    Why it's wrong here

    Cloud Logging does not have a metrics dashboard for alerting; it only provides Logs-based metrics which are used via Monitoring.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Cisco often tests the distinction between viewing metrics (dashboards) and creating actionable metrics (log-based metrics with alerting), leading candidates to mistakenly choose the metrics dashboard option (D) instead of the correct creation workflow (C).

Detailed technical explanation

How to think about this question

Log-based metrics are implemented as a counter that increments each time a log entry matches a specified filter; the metric is automatically ingested into Cloud Monitoring as a custom metric without any agent or API call. Under the hood, Cloud Logging uses a distributed counter that is eventually consistent, so alerts based on log-based metrics may have a slight delay (typically up to a few minutes). In a real-world scenario, you might use this to alert on a sudden spike in 5xx errors or authentication failures, where the log filter would be severity=ERROR AND httpRequest.status >= 500.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCD practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCD practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCD question test?

Managing application performance monitoring — This question tests Managing application performance monitoring — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Create a log-based metric using the Logs Explorer, then set up an alerting policy. — Option C is correct because log-based metrics in Cloud Logging allow you to define a counter metric based on log entries matching a filter (e.g., severity=ERROR). Once the metric is created, you can set up an alerting policy in Cloud Monitoring to trigger when the count exceeds a threshold. This approach is native, serverless, and requires no custom code or external exports.

What should I do if I get this PCD question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more ways this is tested on PCD

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. An application writes structured logs to Cloud Logging. The team wants to create a metric based on the value of a JSON field 'order_total' to alert when totals exceed $1000. What type of metric should they use?

medium
  • A.Uptime check metric.
  • B.Log-based metric.
  • C.Error Reporting metric.
  • D.Custom metric from Cloud Monitoring agent.

Why B: A log-based metric extracts a numeric value from a log entry's JSON payload using a regular expression or a label extractor. By defining a log-based metric on the 'order_total' field and setting an alert threshold of $1000, the team can monitor and alert on high-value orders directly from Cloud Logging without additional instrumentation.

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCD practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCD exam.