Intrigued by the art of cloud architecture? Discover how to design, develop, and manage robust, secure, scalable, and dynamic solutions on Google Cloud as you prepare for the Professional Cloud Architect exam!
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.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
Your organization operates a distributed multi-tier microservices application deployed across multiple Google Cloud projects. The services communicate over HTTP and use Envoy sidecar proxies configured within a service mesh to generate telemetry.
During performance troubleshooting, the operations team notices that requests spanning across project boundaries appear as disconnected, isolated spans in Cloud Trace rather than a single contiguous end-to-end distributed trace.
What should you do to ensure trace continuity across the different projects?
Ensure that applications preserve and propagate the X-Cloud-Trace-Context HTTP header across service calls, and verify each proxy runs with credentials for its respective project.
Grant the roles/cloudtrace.admin role to the Compute Engine default service accounts across all projects to enable automatic cross-project span federation.
Configure a centralized Cloud Storage bucket in the root project and modify the Logging agent on all VMs to stream raw trace files directly into the bucket.
Deploy an internal Application Load Balancer between project boundaries to inspect packets and inject missing trace metadata.
Ensure that applications preserve and propagate the X-Cloud-Trace-Context HTTP header across service calls, and verify each proxy runs with credentials for its respective project.
Cloud Trace relies on context propagation to stitch individual operations (spans) across distributed architectures into a single coherent trace tree. In HTTP-based distributed environments, telemetry frameworks and sidecar proxies like Envoy use standardized tracking headers—specifically the X-Cloud-Trace-Context header—to pass trace identifiers, span identifiers, and trace flags between upstream callers and downstream callee services.
When a request traverses multiple Google Cloud projects:
X-Cloud-Trace-Context HTTP header in all downstream outbound requests. If an intermediary service drops this header, the downstream proxy assumes the call is a new root request, generating a new trace ID and breaking trace correlation.Preserving context headers directly addresses the mechanism used by Cloud Trace and service proxies to establish parent-child span relationships across projects without requiring extra networking infrastructure.
Grant the roles/cloudtrace.admin role to the Compute Engine default service accounts across all projects to enable automatic cross-project span federation.
Configure a centralized Cloud Storage bucket in the root project and modify the Logging agent on all VMs to stream raw trace files directly into the bucket.
Deploy an internal Application Load Balancer between project boundaries to inspect packets and inject missing trace metadata.