Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
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?
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.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.