Bird
0
0

You want to analyze latency in a microservices app using Cloud Trace. Which approach best helps identify the slowest service?

hard📝 Best Practice Q15 of 15
GCP - Cloud Monitoring and Logging
You want to analyze latency in a microservices app using Cloud Trace. Which approach best helps identify the slowest service?
AUse trace spans to compare latency times across services
BEnable Cloud Trace only on the frontend service
CCollect logs instead of traces for latency
DUse Cloud Trace only during off-peak hours
Step-by-Step Solution
Solution:
  1. Step 1: Understand trace spans in microservices

    Trace spans represent operations in each service, showing latency per service.
  2. Step 2: Compare latency across services

    By comparing spans, you can find which service takes the longest time.
  3. Step 3: Evaluate other options

    Enable Cloud Trace only on the frontend service limits data to frontend only, missing backend. Collect logs instead of traces for latency is about logs, not latency. Use Cloud Trace only during off-peak hours restricts data collection unnecessarily.
  4. Final Answer:

    Use trace spans to compare latency times across services -> Option A
  5. Quick Check:

    Trace spans reveal slow services [OK]
Quick Trick: Compare spans latency to find slow service [OK]
Common Mistakes:
  • Enabling trace on only one service
  • Confusing logs with trace latency data
  • Limiting trace collection to certain hours

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes