ADK for TypeScript: API Reference
    Preparing search index...

    Interface AgentRuntimeRequestHooksExperimental

    Hooks a server calls at the start and end of every request, so telemetry is exported while the request still holds the CPU.

    Neither hook throws, and AgentRuntimeRequestHooks.onRequestEnd never rejects: a telemetry failure never breaks the request.

    (Experimental, subject to change)

    interface AgentRuntimeRequestHooks {
        onRequestEnd(): Promise<void>;
        onRequestStart(): void;
    }
    • Experimental

      Call when the handler ends the response, before the response completes. Resolves once metrics are drained and spans and logs are flushed.

      Returns Promise<void>