Skip to content

Sentry Astro SDK #9182

@Lms24

Description

@Lms24
Member

Problem Statement

We're going to build an SDK for Astro! This is necessary to make Spotlight work properly with Astro and it will make Sentry compatible to be used within Astro projects.

Solution Brainstorm

The details remain TBD as we work through things but here's a rough outline of the necessary tasks:

### Initial Tasks
- [ ] https://github.com/getsentry/sentry-javascript/pull/9187
- [ ] https://github.com/getsentry/sentry-javascript/pull/9218
- [ ] https://github.com/getsentry/sentry-javascript/pull/9193
- [x] Figure out necessary build settings
- [x] Add support for `Sentry.init` config files for client and server
- [x] Add Vite plugin for source map upload in the integration
- [x] Make sure, package structure and content adheres to Astro Integration specification

As for publishing, we will publish the SDK as alpha/beta first, leaving us a bit of headroom to change public API if necessary and eventually promote it to stable.

### Adding Astro as a Sentry Platform
- [ ] https://github.com/getsentry/platformicons/pull/111
- [ ] https://github.com/getsentry/sentry/pull/58158
- [ ] https://github.com/getsentry/sentry/pull/58151
- [ ] https://github.com/getsentry/sentry/pull/58156
- [ ] https://github.com/getsentry/sentry-release-registry/pull/128
- [ ] https://github.com/getsentry/sentry-docs/pull/8267
- [ ] https://github.com/getsentry/sentry/pull/58435
- [ ] https://github.com/getsentry/static-sites/pull/2005

Stretch Goals / open ends

If we have time/feel it's necessary or nice to have for an SDK:

  • Add a setup wizard for Astro
  • Add other Astro-specific features
  • Do we need a routing instrumentation?
  • Support non-Node runtimes?

How to deal with other UI frameworks?

Given that Astro supports building UIs with a number of frontend frameworks (React, Svelte, Vue, etc), we might want to consider adding our respective UI framework SDKs to the project. However, I'd argue that this only makes sense in islands. For them, we can direct users in docs to use the respective Sentry SDK to unlock framework-specifc features. For example, component tracking or error handlers/boundaries. (Great timing: We just decoupled SDK intialization and Vue-specific instrumentation in #9180)

Activity

self-assigned this
on Oct 5, 2023
moved this to In Progress in Spotlighton Oct 5, 2023
AbhiPrasad

AbhiPrasad commented on Oct 5, 2023

@AbhiPrasad
Member

See #7378

Lms24

Lms24 commented on Oct 30, 2023

@Lms24
MemberAuthor

Closing this as the initial alpha release is complete

moved this from In Progress to Done in Spotlighton Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Package: astroIssues related to the Sentry Astro SDK

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @Lms24@AbhiPrasad

      Issue actions

        Sentry Astro SDK · Issue #9182 · getsentry/sentry-javascript