
Answer-first summary for fast verification
Answer: Deploy the Pub/Sub and Cloud Run emulators on your local machine. Deploy the application locally, and change the logging level in the application to DEBUG or INFO. Write mock messages to topic A, and then analyze the logs.
The correct approach is to use local emulators and avoid impacting the production environment. Option A suggests deploying the Pub/Sub and Cloud Run emulators on your local machine, which allows for safe testing with mock messages without affecting the production environment. Changing the logging level to DEBUG or INFO provides detailed logs for analysis. Options B, C, and D involve interacting with production resources, which could lead to unintended consequences in the live environment. Option C is particularly risky as it suggests pointing the production application to local Pub/Sub topics, which is not feasible and could disrupt the production service.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your team observed a surge of errors in a Cloud Run application within your production environment. The application is set up to consume messages from Pub/Sub Topic A, process them, and publish the results to Topic B. To diagnose the root cause of the errors, you plan to use a collection of mock messages for testing. What steps should you take?
A
Deploy the Pub/Sub and Cloud Run emulators on your local machine. Deploy the application locally, and change the logging level in the application to DEBUG or INFO. Write mock messages to topic A, and then analyze the logs.
B
Use the gcloud CLI to write mock messages to topic A. Change the logging level in the application to DEBUG or INFO, and then analyze the logs.
C
Deploy the Pub/Sub emulator on your local machine. Point the production application to your local Pub/Sub topics. Write mock messages to topic A, and then analyze the logs.
D
Use the Google Cloud console to write mock messages to topic A. Change the logging level in the application to DEBUG or INFO, and then analyze the logs.
No comments yet.