We have another example to add to the list. Here w...
# guide
j
We have another example to add to the list. Here we show how to use Sentry to monitor the Lambda functions in your SST app. Thanks to @manitej for putting it together. https://serverless-stack.com/examples/how-to-use-sentry-to-monitor-your-serverless-app.html Here’s the sample repo for it: https://github.com/serverless-stack/serverless-stack/tree/master/examples/sentry And here’s how to try it:
p
Amazing. This is hands down the best docs how to setup sentry with lambda. Their own docs are horrible (https://docs.sentry.io/platforms/node/guides/aws-lambda/layer/) and their "automatic" configuration adds a cloudformation stack for what? To check all my lambdas? Thanks so much for this, this is awesome
j
Yeah I actually did a call with their team to figure out the best way to integrate with them. Their docs list multiple ways to integrate. I think they could explain the different approaches better.
p
Did you notice any execution duration problems? I'm a bit relucant into using the
NODE_OPTIONS: -r ...
setting, mostly because of issues like this: https://github.com/getsentry/sentry-javascript/issues/3051
j
Hmm I haven’t used this in prod yet. Does this happen on every call?
p
unclear, since there was never a proper investigation by the sentry team I think
j
I see. When I talk to them again, I’ll bring this up.
p
Thank you!
s
great write-up, @Jay! a nice part 2 would be how to get source maps working. let me know if you plan on that, and I can make some contributions. it took a ton of experimentation and pulling my hair out to get it right 😄
p
Would love to read that!
j
Yeah that would be pretty useful @Sam Hulick. @Frank @manitej let’s add sourcemaps to this example?
s
that’ll be helpful. there’s some specific tweaks you have to make to your Sentry config, otherwise it won’t work
m
I'll DM you @Sam Hulick