In a serverless Python automation triggered by Cloud Functions, you need to call multiple Google APIs and pass context (e.g., user/session metadata) into each request for audit logging. Which implementation detail best supports end-to-end traceability?

Answer

Propagate a correlation/trace ID from the trigger context into logs and include it in each downstream request’s metadata

Explanation

Correlation IDs enable joining logs and API activity across asynchronous boundaries. Including the trace ID in structured logs and metadata makes audits and debugging feasible.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list