Google Associate Cloud Engineer Question 289
Select 2Google Cloud PlatformYou are tasked with monitoring a custom business metric for your application hosted on Google Cloud. You need to create a custom metric and ingest data into Cloud Monitoring. Which of the following steps should you take to accomplish this task?
- A
Define a custom metric descriptor using the Monitoring API.
- B
Ingest metric data by sending a POST request to the Monitoring API with the time series data.
- C
Use Cloud Functions to automatically create custom metrics.
- D
Create a Pub/Sub topic to store metric data before ingestion.
- E
Utilize Google Cloud's built-in metrics, as custom metrics are not supported.
Show answer and explanation
Correct answers: A, B
Explanation
To create and ingest custom metrics into Cloud Monitoring, you need to first define a custom metric descriptor using the Monitoring API to specify the metric's details. Once the metric descriptor is created, you can ingest data by sending a POST request with the relevant time series data to the Monitoring API. This process allows you to monitor application-specific metrics that are not available through Google's built-in metrics.
- A. Correct.
Defining a custom metric descriptor using the Monitoring API is a necessary step to establish the structure of your custom metric before ingesting data.
- B. Correct.
Ingesting metric data by sending a POST request to the Monitoring API with the time series data is the correct method to send your custom metric data to Cloud Monitoring.
- C. Incorrect.
Cloud Functions can be used in conjunction with other services but are not directly responsible for creating custom metrics in Cloud Monitoring.
- D. Incorrect.
Creating a Pub/Sub topic is not directly related to ingesting custom metrics into Cloud Monitoring; it's used for message ingestion and event-driven architectures.
- E. Incorrect.
Google Cloud supports custom metrics, and thus relying solely on built-in metrics is not correct for this scenario.