REMINDER
Sentry.io Error tracking integration
-
Hello team,
I'm using Sentry.io to track errors on the front-end. They also support backend Node.js, and AWS Lambda.
You can implement it one function at a time, but they also offer an automatic integration with these steps:
https://docs.sentry.io/product/integrations/aws-lambda/Is integrating with something like this possible?
I've been integrating on a function-by-function basis, but I have 122 functions, so it could take a while
Also, once I integrate their code on a function-by-function basis (here's an example of the setup code):
const Sentry = require("@sentry/serverless"); Sentry.AWSLambda.init({ dsn: 'https://my-project-id@my-subdomain.ingest.sentry.io/another-project-id', tracesSampleRate: 1.0, }); exports.handler = Sentry.AWSLambda.wrapHandler(async (event, context, callback) => { // code goes here });
I'm having trouble testing the code locally, because the Sentry code thinks it's in a serverless context, with a bunch of context and env variables I don't have locally.
Anyway, would love to see if something like this is possible.
-
Hello,
As your function runtime is under AWS Lambda you can use it to debug locally your functions.
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-invoke.html