Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your microservices application running in Google Cloud writes structured JSON logs to Cloud Logging. While troubleshooting an intermittent issue in the Logs Explorer, you find a failed request log entry that contains diagnostic details inside its jsonPayload, including a unique transaction identifier field named callId.
You want to write a query in the Logs Explorer to filter and correlate all log entries related to this specific transaction ID (d9577780-c608-4bff-9e12-4d9cdea6b298).
Which query filter should you use in the Logs Explorer?
In Cloud Logging, the resource.labels object contains metadata about the underlying Google Cloud infrastructure resource producing the log. This includes attributes such as project_id, pod_name, cluster_name, zone, or container_name.
callId is an application-level identifier generated during execution and is stored in the application's jsonPayload, not in the infrastructure resource descriptor.resource.labels.callId will return no results because Google Cloud managed resources do not contain application-specific transaction keys in their resource definitions.You were filtering logs based on infrastructure attributes, such as filtering for a specific Kubernetes Pod using resource.labels.pod_name = "grpc-client-deployment-155-6967959544-x8ndr".
The textPayload field in Cloud Logging is used for unstructured, plain-text log entries (strings). When an application writes plain text lines, the entire message is captured in textPayload.
textPayload, a jsonPayload, or a protoPayload. Because this application outputs structured JSON, the parsed fields exist under jsonPayload.textPayload is a single string field and does not have child properties or keys like .callId.textPayload contains unparsed string data.textPayload is typically done with substring matches or regular expressions (e.g., textPayload =~ "error").The application logged plain, unstructured text lines and you performed a text substring search across textPayload rather than parsing structured JSON keys.
The top-level labels field in a Cloud Logging entry represents user-defined or system-defined log entry labels that are applied to the entry as metadata (for example, labels.environment = "example-client").
callId is contained within the structured jsonPayload emitted by the application, not as an explicit Cloud Logging entry metadata label in the top-level labels map.labels.callId looks for a log label attached at the envelope level, which will fail to match properties residing inside the serialized JSON message body.The application or logging agent was configured to attach callId as a custom top-level log label on every log entry envelope rather than including it inside the application JSON payload body.
In Google Cloud Logging, log entries can contain structured data stored within the jsonPayload field. When applications emit logs as JSON objects, Cloud Logging parses the structure and exposes each property as a field under jsonPayload, allowing you to build precise search queries and correlate related log entries using dot notation.
callId is located within the custom JSON payload. Referencing jsonPayload.callId directly targets this specific key within the log structure.callId value, the Logs Explorer will return all log entries across the entire transaction lifecycle that share that identifier, enabling end-to-end event correlation and timeline reconstruction.=) with the specific string value ensures only matching events for that transaction are retrieved without noise.jsonPayload.peer.address or jsonPayload.payload.statusCode).Targeting jsonPayload.callId uses the native structure of Cloud Logging JSON entries to isolate diagnostic records accurately without relying on unstructured text searches or misclassified resource labels.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated