Bird
0
0

After creating a log-based metric with a filter, you notice it never increments. Which of the following is the most probable cause?

medium📝 Debug Q6 of 15
GCP - Cloud Monitoring and Logging
After creating a log-based metric with a filter, you notice it never increments. Which of the following is the most probable cause?
AThe filter does not match any existing log entries.
BThe metric is automatically disabled after creation.
CLog-based metrics require manual data input to increment.
DThe logs are stored in a different Google Cloud project.
Step-by-Step Solution
Solution:
  1. Step 1: Understand metric behavior

    Log-based metrics increment only when logs match the filter.
  2. Step 2: Evaluate options

    Metrics are not disabled automatically; they do not require manual input.
  3. Step 3: Consider project scope

    Logs in other projects won't affect this metric unless cross-project logging is configured.
  4. Final Answer:

    The filter does not match any existing log entries. -> Option A
  5. Quick Check:

    No matching logs means no metric increments [OK]
Quick Trick: Metric increments only if logs match filter [OK]
Common Mistakes:
  • Assuming metrics disable themselves
  • Thinking manual input is needed
  • Ignoring project boundaries

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes