PCDOE Implementing service monitoring strategies Practice Question
Exhibit
```
"logsBasedMetric": {
"filter": "resource.type=\"gce_instance\" AND jsonPayload.status=\"500\"",
"metricDescriptor": {
"metricKind": "DELTA",
"valueType": "INT64",
"name": "custom.googleapis.com/errors/5xx"
},
"labelExtractors": {
"instance_id": "EXTRACT(jsonPayload.instance_id)"
},
"description": "Count of 500 errors per instance"
}
```An SRE team created the above logs-based metric. They expect it to count the number of HTTP 500 errors per instance. However, the metric shows no data. What is the most likely cause?
⚠ Common exam trap
Google Cloud often tests the misconception that metric kind or naming conventions cause missing data, but the real issue is almost always a mismatch between the log entry's actual field structure and the metric's extraction configuration.
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
✓
The log entries might not have the 'status' field in jsonPayload; it could be in a different location or format.
The most likely reason for a logs-based metric showing no data is that the log entries do not contain the expected 'status' field in jsonPayload, or it is located in a different field (e.g., httpRequest.status) or formatted as a string instead of an integer. Cloud Logging metrics rely on exact field paths defined in the metric descriptor; if the field is missing or misnamed, no data points are generated.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The metric kind is DELTA but should be CUMULATIVE.
Why it's wrong here
DELTA is appropriate for counting events over time; CUMULATIVE would not change the filter matching issue.
- ✓
The log entries might not have the 'status' field in jsonPayload; it could be in a different location or format.
Why this is correct
If the logs are structured differently, the filter will not match, resulting in no data.
- ✗
The metric name does not follow the required naming convention.
Why it's wrong here
custom.googleapis.com/errors/5xx is a valid custom metric name.
- ✗
The labelExtractors must use regex instead of JSON path.
Why it's wrong here
EXTRACT with jsonPayload is valid; regex is not required.
Go deeper
Related to this question
About these practice questions
This PCDOE question is part of Courseiva's 486-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCDOE 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 PCDOE exam.