Google Cloud Professional Cloud Developer — Question 144

Your team detected a spike of errors in an application running on Cloud Run in your production project. The application is configured to read messages from Pub/Sub topic A, process the messages, and write the messages to topic B. You want to conduct tests to identify the cause of the errors. You can use a set of mock messages for testing. What should you do?

Answer options

Correct answer: A

Explanation

The correct answer is A because it involves using both the Pub/Sub and Cloud Run emulators, which allows for a complete local testing environment that mimics the production setup. This enables detailed logging at the DEBUG or INFO level, facilitating thorough analysis of the application’s behavior with mock messages. The other options either lack the emulation of Cloud Run or do not provide the same level of control and analysis as running the application locally with emulators.