Cloud Engineer Cloud Monitoring, Logging & Observability 2 — Questions and Answers
Question 1: Which tool in Google Cloud is best suited for identifying performance bottlenecks in distributed microservices by visualizing request latency across services?
- Cloud Monitoring
- Cloud Profiler
- Cloud Trace (Correct answer)
- Error Reporting
Correct answer: Cloud Trace
Cloud Trace collects latency data from applications and displays distributed traces, allowing you to identify performance bottlenecks across microservices.
Question 2: A developer wants to be automatically notified when their application starts throwing a new type of exception in production. Which service provides this capability?
- Cloud Monitoring
- Cloud Logging
- Error Reporting (Correct answer)
- Cloud Trace
Correct answer: Error Reporting
Error Reporting aggregates and de-duplicates application errors and sends notifications when new error groups are detected in your application.
Question 3: You need to create a metric based on the count of log entries containing the word 'ERROR' in your application logs. What should you configure in Cloud Logging?
- Log sink
- Log-based metric (Correct answer)
- Log bucket
- Log exclusion
Correct answer: Log-based metric
Log-based metrics extract numeric values from log entries matching a filter and make them available as Cloud Monitoring metrics for alerting and dashboards.
Question 4: Which IAM role grants a user read-only access to view logs in Cloud Logging without allowing them to modify log sinks or exclusions?
- roles/logging.admin
- roles/logging.logWriter
- roles/logging.viewer (Correct answer)
- roles/logging.configWriter
Correct answer: roles/logging.viewer
The roles/logging.viewer role grants permission to view logs, log-based metrics, and logging configuration but not to modify them.
Question 5: A Cloud Monitoring alerting policy is configured with a condition duration of 5 minutes. What does this mean?
- The alert fires immediately when the threshold is exceeded for any instant
- The alert fires only if the threshold is continuously exceeded for 5 minutes (Correct answer)
- Notifications are delayed by 5 minutes after the alert fires
- The alert policy is evaluated every 5 minutes
Correct answer: The alert fires only if the threshold is continuously exceeded for 5 minutes
The condition duration (also called the alignment period or 'for' window) requires the threshold to be continuously violated for the specified duration before the alerting policy fires.
Question 6: You want to reduce Cloud Logging ingestion costs by dropping noisy DEBUG-level log entries from a specific service before they are stored. What should you configure?
- Log sink to /dev/null
- Log exclusion filter (Correct answer)
- Log bucket with reduced retention
- Cloud Monitoring alert suppression
Correct answer: Log exclusion filter
Log exclusion filters in Cloud Logging drop matching log entries before they are ingested and stored, reducing ingestion volume and costs.
Question 7: Which Cloud Profiler feature helps reduce the performance overhead of continuous profiling in production?
- It only profiles code during scheduled maintenance windows
- It uses statistical sampling to collect performance data with low overhead (Correct answer)
- It requires a debug build of the application
- It profiles only the main thread of the application
Correct answer: It uses statistical sampling to collect performance data with low overhead
Cloud Profiler uses statistical (sampling-based) profiling, which introduces minimal CPU and memory overhead, making it safe to run continuously in production.
Which tool in Google Cloud is best suited for identifying performance bottlenecks in distributed microservices by visualizing request latency across services?