PROFESSIONAL-CLOUD-DEVELOPER · Question #9
Your application performs well when tested locally, but it runs significantly slower when you deploy it to App Engine standard environment. You want to diagnose the problem. What should you do?
The correct answer is D. Add logging commands to the application and use Stackdriver Logging to check where the. When an application performs well locally but slowly in production, the most practical diagnostic approach is to add logging statements at key points in the code and use Stackdriver Logging to inspect the output. This lets you trace execution step-by-step and pinpoint exactly whi
Question
Your application performs well when tested locally, but it runs significantly slower when you deploy it to App Engine standard environment. You want to diagnose the problem. What should you do?
Options
- AFile a ticket with Cloud Support indicating that the application performs faster locally.
- BUse Stackdriver Debugger Snapshots to look at a point-in-time execution of the application.
- CUse Stackdriver Trace to determine which functions within the application have higher latency.
- DAdd logging commands to the application and use Stackdriver Logging to check where the
How the community answered
(39 responses)- A18% (7)
- B3% (1)
- C8% (3)
- D72% (28)
Explanation
When an application performs well locally but slowly in production, the most practical diagnostic approach is to add logging statements at key points in the code and use Stackdriver Logging to inspect the output. This lets you trace execution step-by-step and pinpoint exactly which function, API call, or operation is taking longer in the App Engine environment. Option A is not actionable. Option B (Debugger Snapshots) captures state at a moment in time but does not measure latency across a request lifecycle. Option C (Stackdriver Trace) is useful for distributed tracing but requires existing instrumentation; adding explicit log statements gives you the most granular, controllable visibility into where time is being spent during production request processing.
Topics
Community Discussion
No community discussion yet for this question.