Serverless Stack

Serverless Stack (SST) is a framework that makes it easy to build serverless apps. SST supports JavaScript, TypeScript, Python, Golang, and C#.

Monitor a function

To monitor a specific Lambda function, add the lumigo:auto-trace tag and set it to true. Add the following to your CDK code.

import * as cdk from "@aws-cdk/core";

cdk.Tags.of(myfunc).add("lumigo:auto-trace", "true");

Monitor all functions

To monitor all the functions in a stack, you can use the Stack construct's [getAllFunctions](https://docs.serverless-stack.com/constructs/Stack#getallfunctions) method and do the following at the bottom of your stack definition.

import * as cdk from "@aws-cdk/core";

this.getAllFunctions().forEach(fn =>
  cdk.Tags.of(fn).add("lumigo:auto-trace", "true")
);

For more info, check out the SST docs.