tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Cloud Platforms > Google Cloud Platform (GCP) > Cloud Trace

Cloud Trace

Author: Venkata Sudhakar

Google Cloud Trace is a distributed tracing system that collects latency data from your applications and displays it in the Google Cloud Console. It helps you understand how requests propagate through your distributed system and identify performance bottlenecks.

Key Features:

1. End-to-end tracing - Track requests across multiple services, databases, and APIs.

2. Latency analysis - Identify slow spans and bottlenecks in your request path.

3. Automatic instrumentation - Auto-traces for App Engine, Cloud Run, and GKE with no code changes.

4. OpenTelemetry support - Industry-standard instrumentation for custom tracing.

5. Trace comparison - Compare latency distributions across different time periods or versions.

The below example shows how to instrument a Java application with Cloud Trace using OpenTelemetry.


It gives the following output in Cloud Trace UI,

Trace: process-order
Total latency: 168ms
  |-- db.query.get-order          45ms  (26.8%)
  |-- http.post.payment-service  120ms  (71.4%)
Bottleneck: payment-service call (120ms)
Recommendation: Optimize payment API or add caching

Cloud Trace vs Cloud Profiler:

Cloud Trace - Shows the flow of a single request across multiple services (distributed tracing). Answers "where did this request spend its time across services?"

Cloud Profiler - Shows aggregate CPU/memory usage patterns across many requests within a single service. Answers "which functions in my code consume the most resources overall?"


 
  


  
bl  br