0
0
GCPcloud~20 mins

Cloud Trace for latency analysis in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cloud Trace Latency Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
1:30remaining
Understanding Trace Span Latency Calculation
You have a trace with three spans: Span A starts at 0ms and ends at 50ms, Span B starts at 10ms and ends at 30ms, and Span C starts at 35ms and ends at 45ms. What is the total latency reported by Cloud Trace for this trace?
A30 milliseconds
B40 milliseconds
C60 milliseconds
D50 milliseconds
Attempts:
2 left
💡 Hint

Think about the overall start and end time of the entire trace, not just individual spans.

Architecture
intermediate
1:30remaining
Choosing Trace Sampling Rate for Latency Analysis
You want to analyze latency spikes in a high-traffic web application using Cloud Trace. Which sampling strategy best balances cost and capturing latency spikes?
ASample only requests that exceed a latency threshold
BSample a fixed small percentage of requests randomly
CSample 100% of all requests to capture every latency spike
DDo not sample any requests to save cost
Attempts:
2 left
💡 Hint

Consider how to capture important slow requests without overwhelming data volume.

security
advanced
2:00remaining
Securing Trace Data Access
Your team uses Cloud Trace to analyze latency but wants to restrict access to trace data containing sensitive user information. Which IAM role assignment best enforces least privilege for trace data access?
AAssign roles/cloudtrace.agent to all developers
BAssign roles/editor to all team members for full project access
CAssign roles/cloudtrace.viewer only to users who need to view trace data
DAssign roles/owner to the team lead for trace data access
Attempts:
2 left
💡 Hint

Least privilege means giving only the permissions needed to perform a task.

Configuration
advanced
2:00remaining
Configuring Custom Trace Attributes for Latency Analysis
You want to add a custom attribute named 'user_region' to all your trace spans to analyze latency by region. Which configuration step is required to ensure this attribute appears in Cloud Trace?
AAdd 'user_region' as a label in your application code when creating spans
BEnable 'user_region' in the Cloud Trace console settings
CCreate a Cloud Logging sink to export 'user_region' attributes
DSet 'user_region' as an environment variable on your VM instances
Attempts:
2 left
💡 Hint

Custom attributes must be added where spans are created.

Best Practice
expert
2:30remaining
Optimizing Trace Data Retention and Cost
Your organization wants to keep detailed latency traces for 30 days but minimize storage costs. Which approach best achieves this goal using Cloud Trace features?
AKeep all trace data in Cloud Trace indefinitely with no export
BExport trace data to Cloud Storage with lifecycle rules to delete after 30 days
CDisable trace data collection after 30 days
DManually delete trace data daily from Cloud Trace
Attempts:
2 left
💡 Hint

Think about exporting data to cheaper storage with automatic deletion.