API / APIGEE Gateway Interview Questions
What is the Apigee Debug / Trace tool and how do you use it for troubleshooting?
The Debug (Trace) tool in the Apigee UI captures a real-time, step-by-step view of a request as it flows through the proxy pipeline. It shows which policies executed, the values of flow variables at each step, and any errors raised. It is the primary debugging tool for Apigee proxy developers.
<!-- Trace is started from the Apigee UI: Develop > API Proxies > [proxy name] > Debug tab Or via API: POST /organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/debugsessions A trace session captures: - Every policy that executed and its result - All flow variables and their values at each step - Request/response headers and body - Time spent at each step (ms) - Any faults raised and which FaultRule handled them Reading a trace: - Green step: policy executed successfully - Red step: policy raised a fault - Grey step: policy was skipped (condition was false) - Phase markers: ProxyRequest, TargetRequest, TargetResponse, ProxyResponse Common debugging workflows: 1. Variable values wrong: check ExtractVariables step output 2. Policy not executing: check condition expression in grey steps 3. Auth failing: check VerifyAPIKey step - red with fault.name 4. Slow response: check timing at TargetRequest/TargetResponse 5. Wrong response body: check AssignMessage step output IMPORTANT: Trace sessions capture sensitive data (request bodies, headers, API keys). Limit trace in production environments. -->
More Related questions...