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.
A cloud engineer is reviewing an individual log entry in the Logs Explorer to troubleshoot an application failure. While viewing the expanded JSON object of the LogEntry, the engineer needs to determine the exact Google Cloud infrastructure component that emitted the log, including its resource type and specific identifying metadata such as the project ID and zone.
Which top-level field in the LogEntry structure contains this information?
The logName field is a required string in every LogEntry that defines the fully qualified resource URI of the log stream. It indicates the parent container (such as a project, organization, folder, or billing account) and a specific log identifier (such as stdout, stderr, or cloudaudit.googleapis.com%2Factivity). A representative format is projects/PROJECT_ID/logs/LOG_ID.
logName contains the parent project ID within its path, it does not identify the specific resource type (e.g., whether the emitter is a Compute Engine VM or Cloud Run service).logs/run.googleapis.com%2Frequests).This option would be correct if the engineer needed to find the complete URI identifying the specific log collection stream or needed to distinguish between standard output (stdout), standard error (stderr), or audit event streams.
The jsonPayload field represents the diagnostic body or message content of a structured log entry formatted as a JSON object. When applications emit structured logs, Cloud Logging parses the serialized JSON payload into key-value pairs within jsonPayload, enabling deep filtering on application-specific properties.
jsonPayload field holds the diagnostic or operational payload generated by the running software, not the Google Cloud resource definition.jsonPayload are determined entirely by the application code or library, rather than following Google Cloud's standardized infrastructure schema.textPayload, jsonPayload, or protoPayload; none of these fields define the host resource type or zone.jsonPayload.userId="12345").severity or message) are stripped from jsonPayload and promoted to top-level LogEntry fields, but infrastructure identity remains under resource.This option would be correct if the engineer needed to analyze structured application data, custom diagnostic payloads, or error parameters emitted directly by the microservice code.
In Google Cloud Logging, the resource field is a standard top-level object of type MonitoredResource within every LogEntry. It explicitly defines the cloud entity or infrastructure environment that produced the log event. The object consists of two core attributes: resource.type, which specifies the monitored resource type (such as gce_instance, cloud_run_revision, or k8s_container), and resource.labels, which stores key-value pairs detailing the exact identity and topology of that resource (such as project_id, zone, instance_id, or service_name).
resource.type property indicates whether the event originated from a Compute Engine virtual machine, a Google Kubernetes Engine pod, a Cloud Run revision, or a load balancer.resource.labels dictionary stores essential topological attributes, such as the hosting project ID, region, zone, cluster name, or instance identifier.resource.type="gce_instance" and resource.labels.zone="us-central1-a".MonitoredResource model, ensuring uniform metadata across heterogeneous workloads.The resource object is the purpose-built field in Cloud Logging designed specifically to record infrastructure source definitions and topological labels. Other top-level fields handle application payloads, log stream names, or arbitrary user labels.
In a LogEntry, the top-level labels field is a dictionary of key-value pairs that provides custom user-defined or runtime-specific classification metadata. These labels allow developers and operators to annotate log entries with business or application context, such as environment designations (env: prod), release versions, or component identifiers.
labels field does not define the monitored cloud resource schema or its official resource type.project_id, zone, and cluster_name are placed under resource.labels, whereas top-level labels holds arbitrary user or runtime tags.labels, and applications may omit them without issue.resource.labels, which enforces strict keys per resource type, top-level labels accept any arbitrary string keys and values.This option would be correct if the engineer needed to inspect custom user-defined tags, arbitrary application annotations, or build metadata explicitly attached to the log entry rather than the underlying Google Cloud infrastructure resource.
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