A DevOps team wants to alert when a Compute Engine instance is unreachable for 5 minutes. Which alerting condition type should be used?
Absent condition triggers when a metric (e.g., uptime check) stops reporting.
14 of 89 questions · Page 2/2 · Pcde Monitoring Strategies topic · Answers revealed
A DevOps team wants to alert when a Compute Engine instance is unreachable for 5 minutes. Which alerting condition type should be used?
Absent condition triggers when a metric (e.g., uptime check) stops reporting.
Your application runs on Google Kubernetes Engine (GKE) and emits traces using the OpenTelemetry SDK. You want to export these traces to Cloud Trace. Which configuration is required?
This is the standard way to export traces from OpenTelemetry to Cloud Trace.
Why this answer
To export OpenTelemetry traces to Cloud Trace, you need to configure the OpenTelemetry exporter to use the Google Cloud Trace exporter, and set the GCP project ID.
Which of the following is a key benefit of using structured logging in Cloud Logging?
Structured logs (JSON) allow Cloud Logging to parse fields automatically.
Which Cloud Monitoring feature allows you to group log entries from the same request across multiple services using a common identifier?
Cloud Trace uses trace IDs to correlate requests across services.
Why this answer
Cloud Trace uses trace IDs to correlate requests across services. Logs can include the trace ID to enable correlation between logs and traces.
What is the primary purpose of including a runbook URL in an alert policy's documentation?
Runbook URL provides actionable guidance for alert responders.
An application is emitting custom metrics using OpenTelemetry. You want to collect and export these metrics to Cloud Monitoring. Which TWO components are required? (Select 2)
The SDK instruments the application to emit metrics.
Why this answer
The OpenTelemetry Collector can receive metrics from the application and export them to Cloud Monitoring using the Google Cloud Monitoring exporter.
A company wants to use Cloud Monitoring dashboards to display real-time metrics for their application, but they also need to version control the dashboard configurations. Which approach should they use?
This allows declarative management, review, and version control of dashboard configurations.
Why this answer
Cloud Monitoring dashboards can be defined as JSON or YAML and managed via the Monitoring API or Terraform. This allows version control and CI/CD. Manually creating dashboards in the console is not reproducible.
A developer needs to manually instrument a Go application with distributed tracing and send traces to Cloud Trace. Which approach should they use?
OpenTelemetry is the recommended vendor-neutral approach for manual instrumentation.
You are designing a distributed tracing strategy for a multi-service application deployed on Cloud Run and GKE. You need to ensure that all traces are captured with 100% sampling for the first 10 minutes after a new deployment, and then reduce to 10% sampling to control costs. Which approach should you use?
This allows dynamic sampling rules based on deployment time. The custom sampler can implement the required logic.
Why this answer
Cloud Trace supports probability-based sampling, but to change the sampling rate based on time since deployment, you need more control. Using OpenTelemetry with a custom sampler in the application allows you to implement a rule: sample 100% if the deployment timestamp is within the last 10 minutes, else sample 10%. The OTel Collector can then export to Cloud Trace.
Cloud Trace's built-in sampling is static.
An application running on Cloud Run is automatically instrumented with Cloud Trace, but the trace sampling rate is too high, causing excessive costs. How can the engineer reduce the sampling rate?
Cloud Run uses the OpenTelemetry environment variable for sampling rate.
An application running on Google Kubernetes Engine (GKE) emits structured logs in JSON format. The DevOps team wants to count the number of log entries that contain a specific error code (e.g., 'error_code': 500) in the last hour and use that count to trigger an alert if it exceeds a threshold. What is the most efficient way to achieve this?
Log-based metrics automatically count matching log entries and export them as a metric to Cloud Monitoring, enabling alerting and dashboards with minimal overhead.
Why this answer
Creating a log-based metric from the logs is the most efficient approach. You can define a counter metric that increments each time a log entry matches the filter (e.g., jsonPayload.error_code=500). Then you can set up an alerting policy on that metric.
This avoids scanning logs in real-time and provides a metric that can be used for dashboards and alerts.
A DevOps team is implementing distributed tracing for a microservices application on GKE. They want to ensure traces are exported to Cloud Trace with minimal overhead. Which TWO approaches should they consider? (Choose 2)
OpenTelemetry is the recommended approach for distributed tracing.
Why this answer
OpenTelemetry SDK and automatic instrumentation for GKE (via Anthos Service Mesh) are both valid. The Stackdriver Trace API is deprecated in favor of OpenTelemetry.
A team is using OpenTelemetry to instrument their microservices and wants to export traces to Cloud Trace. They have deployed the OpenTelemetry Collector as a DaemonSet on GKE. What configuration is needed on the Collector to send traces to Cloud Trace?
The googlecloud exporter sends traces directly to Cloud Trace.
Why this answer
The OpenTelemetry Collector needs an exporter configured for Google Cloud Trace. The 'googlecloud' exporter (or 'stackdriver' exporter) sends traces to Cloud Trace. The Collector must also have the appropriate IAM permissions (e.g., roles/cloudtrace.agent).
You need to send alert notifications to a Slack channel. Which TWO components are required?
Correct. The Slack notification channel must be created with the webhook URL.
Why this answer
To send alerts to Slack, you need a Slack app with a webhook URL, and a Cloud Monitoring notification channel of type 'slack' configured with that webhook URL. Pub/Sub is not required for Slack directly; Slack channels are configured via webhooks. Email notification channel type is incorrect; Slack is a separate type.
A Cloud Function could be used as an intermediary but is not required.
Ready to test yourself?
Try a timed practice session using only Pcde Monitoring Strategies questions.