Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Official Sentry Astro SDK #7378

Mar 8, 2023 · 2 comments · 3 replies
Discussion options

https://github.com/withastro/astro

https://astro.build/

Add Sentry support for Astro -@sentry/astro

All the goodies you expect out of a Sentry SDK:

  • Error monitoring and crash reporting OOB
  • Performance monitoring support
  • Trace propogation of sentry-trace/baggage
  • Release health support
  • Automatic source map uploading (using our official Vite Plugin)

All powered by our browser SDK @sentry/browser and our Node JS SDK (@sentry/node). We also need the option to use the framework specific SDKs like @sentry/react if someone is using a specific frontend framework.

Please comment/react to this post if you would like to see this - that helps us prioritize this work.

You must be logged in to vote

Replies: 2 comments 3 replies

Comment options

Yes! Also, I'm sure the Astro team would be interested. 🙂

(don't forget automated source map uploads)

You must be logged in to vote
1 reply
Comment options

AbhiPrasad Mar 13, 2023
Maintainer Author

Added to the list, thanks for the shout-out!

Comment options

@AbhiPrasad Hey wait, since Astro uses Vite under the hood, wouldn't this work in Astro's config?

vite: {
 plugins: [
 sentryVitePlugin({
 org: 'xyz',
 project: 'abc',
 include: './dist',
 authToken: process.env.SENTRY_AUTH_TOKEN,
 }),
You must be logged in to vote
2 replies
Comment options

AbhiPrasad Mar 14, 2023
Maintainer Author

Yup this worked for me on my personal project, only thing you might have to fiddle around with is include if you have a more custom setup.

Comment options

Still, might be nice to have (as a lower priority) an Astro integration to just tack on via astro.config.mjs.

export default defineConfig({
 output: 'server',
 integrations: [sentry({ dsn: '...', /* other config settings */ })],
});

In my case, I've got an Astro project with SST dropped in, so it might be more complicated where to point include. I'll have to ponder on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /