Monitor and Analyze System Resource Utilization on Google Cloud Platform

Collecting Detailed Metrics for System Resource Utilization on Google Cloud Platform

Question

Your team is designing a new application for deployment both inside and outside Google Cloud Platform (GCP)

You need to collect detailed metrics such as system resource utilization.

You want to use centralized GCP services while minimizing the amount of work required to set up this collection system.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.

To collect detailed metrics such as system resource utilization, while using centralized GCP services and minimizing setup work, the best option is to use Stackdriver, a monitoring, logging, and diagnostics solution provided by Google.

Option A: Import the Stackdriver Profiler package, and configure it to relay function timing data to Stackdriver for further analysis.

Stackdriver Profiler is a tool that collects profiling data from a running application and provides insights into its performance. It works by collecting function call stack traces and analyzing them to identify performance bottlenecks. By importing the Stackdriver Profiler package and configuring it to relay function timing data to Stackdriver, you can collect detailed information about your application's performance without requiring any additional setup.

Option B: Import the Stackdriver Debugger package, and configure the application to emit debug messages with timing information.

Stackdriver Debugger is a tool that allows developers to debug applications in production without having to stop or pause the application. It works by attaching a snapshot agent to the application's runtime, which captures the state of the application at a specific point in time. By importing the Stackdriver Debugger package and configuring the application to emit debug messages with timing information, you can gain insights into the application's performance without requiring any additional setup.

Option C: Instrument the code using a timing library, and publish the metrics via a health check endpoint that is scraped by Stackdriver.

This option involves instrumenting the code with a timing library that collects performance metrics, and then publishing those metrics via a health check endpoint that is scraped by Stackdriver. While this option is possible, it requires additional setup work compared to the previous options and may not be as reliable as using Stackdriver Profiler or Debugger.

Option D: Install an Application Performance Monitoring (APM) tool in both locations, and configure an export to a central data storage location for analysis.

This option involves installing an APM tool in both locations and configuring an export to a central data storage location for analysis. While this option may provide detailed metrics, it requires additional setup work and may not be as cost-effective as using Stackdriver, which is a GCP-native solution.

Overall, the best option is to use Stackdriver Profiler or Debugger to collect detailed metrics while minimizing setup work and using centralized GCP services.