Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
Your organization runs a microservices architecture distributed across Cloud Run and Compute Engine instances. During incident investigations, engineers struggle to correlate application logs with distributed traces in Google Cloud Observability.
You need to implement end-to-end trace context propagation between services and ensure application log entries are automatically correlated with Cloud Trace in Cloud Logging.
Which configuration should you implement?
User-Agent string of internal requests and rely on unstructured plaintext logs ingested via the Cloud Logging agent without metadata enrichment.Embedding deployment or pipeline execution IDs into the User-Agent header is a technique for tracking client versions or CI/CD runners in audit records, while plaintext logging emits unparsed strings directly to the logger.
User-Agent header disrupts standard client identity tracking and fails to carry necessary span, parent span, and trace sampling bit flags required by distributed tracing engines.logging.googleapis.com/trace).textPayload) without indexed trace attributes.User-Agent for parent/child context binding.You needed to track which build system or automated script version originated specific API calls within access logs.
X-Goog-Request-Reason HTTP header containing the trace ID to all internal service requests, and format logs by writing the trace identifier exclusively inside jsonPayload.message.The X-Goog-Request-Reason header is a Google Cloud API system parameter used to supply an audit reason or CI/CD deployment reference for Google Cloud control plane requests, rather than application-level distributed tracing.
X-Goog-Request-Reason is intended for API audit trails and is not recognized by tracing frameworks or Google Cloud runtime infrastructure for child span creation.jsonPayload.message prevents Cloud Logging from indexing it as a native trace pointer, leaving trace waterfall views devoid of correlating logs.logging.googleapis.com/trace), not embedded substring text in message.X-Goog-Request-Reason as a standard trace context header.You needed to record an administrative deployment identifier or ticket tracking reference in Cloud Audit Logs during automated infrastructure provisioning.
traceparent or X-Cloud-Trace-Context), and emit structured JSON logs containing the logging.googleapis.com/trace field formatted as projects/[PROJECT_ID]/traces/[TRACE_ID] and the logging.googleapis.com/spanId field.Trace context propagation passes unique identifiers (Trace ID, Span ID, and trace flags) across network and process boundaries in distributed systems. Google Cloud Observability automatically links structured application logs to trace spans when log entries include designated special JSON fields recognized by the Cloud Logging ingestion pipeline.
traceparent or Google's X-Cloud-Trace-Context header) and injecting it into outgoing client requests ensures that downstream services running on Cloud Run or Compute Engine participate in the same global trace.stdout/stderr or via the logging agent with logging.googleapis.com/trace set to projects/[PROJECT_ID]/traces/[TRACE_ID] and logging.googleapis.com/spanId set to the hex span ID, Cloud Logging automatically associates each log entry directly with the corresponding Cloud Trace span.This approach directly aligns with Google Cloud Observability architecture by leveraging native trace field extraction and standard W3C/HTTP propagation mechanisms without introducing latency or infrastructure dependencies.
VPC Flow Logs record network-level TCP/IP flow samples (source/destination IP, port, protocol, packets). Mapping these to a Unified Data Model (UDM) in Google SecOps is a security and network monitoring pattern.
The objective was to conduct centralized security audits, network forensics, or threat detection across Compute Engine network interfaces.
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 Validated