source map goodness! :thread: sharing esbuild plug...
# general
s
source map goodness! 🧵 sharing esbuild plugin code here, & we can discuss improvements
first, the esbuild plugin
and my SST deploy script:
Copy code
#!/bin/sh
set -ex

export SENTRY_RELEASE=$(git rev-parse --short HEAD)
sst deploy $*
yarn sentry-cli releases --org reelcrafter --project v2-microservices files $SENTRY_RELEASE upload-sourcemaps .build/sourcemaps
@Frank @thdxr this seems to work well. the only slightly weird thing is that if I deploy just one stack, it still uploads maps for all my stacks. but this won’t harm anything, since the
SENTRY_RELEASE
is baked into each Lambda func via the env, so it’ll still look up the proper source map
r
Do you rate Sentry.io highly?
s
definitely. IMO it’s a must-have. granted, I haven’t looked around at other solutions in a long time (I left Rollbar long ago). but Sentry is excellent, and great support for serverless stuff
r
Might have to take a look, we use Bugsnag which is ok
t
I always use sentry.io
a
@thdxr how do sentry and epsagon play together?
r
I know Epsagon have recently launched a frontend tracing option for React apps so you can tie a request all the way from UI through to the serverless backend which would be very cool, except we don't use React. I think Vue is in the works
j
@Frank does it make sense to create a doc around this?
f
Yeah definitely. I was going to work on an example for datadog integration. We should add sentry and epsagon as well.
a
That would be great, thank you. Could you please add middyjs in this mix as well? The validator, body parser, error handler, event normalizer, header normalizer and response serializer plugins bring a lot of value and reduce some decent amount of boilerplate as well.
f
Will do!