Closed nnyegaard closed 1 year ago
Hi, sorry for missing this issue, I'll be looking into it :-)
Hi @nnyegaard, well, you are trying to use a method that takes in input the entire CDK app, and try to use it to trace a Function construct. For that, you need to invoke:
const function = new Function(...);
new Lumigo({
lumigoToken: SecretValue.unsafePlainText("xxx"),
}).traceLambda(function);
This is something that the TypeScript hints should tell you, but I am guessing you are using plain JavaScript, right?
I went and added type validation to the public APIs. The message should be smart enough to point people with the same problem in the right direction, I hope.
When I use the function
traceLambda()
the lib throws anTypeError: Cannot read properties of undefined (reading 'name')
Snippet:
If I use
traceEverything()
it works.