API Reference
    Preparing search index...

    Options for handler decorators and middleware.

    Options supported:

    • captureResponse - (optional) - Disable response serialization as subsegment metadata

    Middleware usage:

    import middy from '@middy/core';

    const tracer = new Tracer();

    const lambdaHandler = async (_event: any, _context: any): Promise<void> => {};

    export const handler = middy(lambdaHandler)
    .use(captureLambdaHandler(tracer, { captureResponse: false }));

    Decorator usage:

    const tracer = new Tracer();

    class Lambda implements LambdaInterface {
    @tracer.captureLambdaHandler({ captureResponse: false })
    public async handler(_event: any, _context: any): Promise<void> {}
    }

    const handlerClass = new Lambda();
    export const handler = handlerClass.handler.bind(handlerClass);
    type CaptureLambdaHandlerOptions = {
        captureResponse?: boolean;
    }
    Index

    Properties

    Properties

    captureResponse?: boolean