Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry Astro SDK #9182

Closed
15 tasks done
Lms24 opened this issue Oct 5, 2023 · 2 comments
Closed
15 tasks done

Sentry Astro SDK #9182

Lms24 opened this issue Oct 5, 2023 · 2 comments
Assignees
Labels
Package: astro Issues related to the Sentry Astro SDK

Comments

@Lms24
Copy link
Member

Lms24 commented Oct 5, 2023

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

  1. Lms24
  2. Lms24
  3. Lms24

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

  1. Lms24
  2. Scope: Frontend
    Lms24
  3. Scope: Backend
    Lms24
  4. Scope: Frontend
    Lms24
  5. Lms24
  6. Lms24
  7. Scope: Frontend
    Lms24

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)

@Lms24 Lms24 self-assigned this Oct 5, 2023
@Lms24 Lms24 added Package: astro Issues related to the Sentry Astro SDK and removed Type: Improvement labels Oct 5, 2023
@AbhiPrasad AbhiPrasad mentioned this issue Oct 5, 2023
@AbhiPrasad
Copy link
Member

See #7378

Lms24 added a commit that referenced this issue Oct 6, 2023
Add the boilerplate files for the new `@sentry/astro` package. Amongst the usual files, some noteworthy things include:
* Bumped the Volta Node version from 16 to 18 for the entire monorepo.
* Using Vitest instead of Jest, like we do in SvelteKit. 

ref #9182
Lms24 added a commit that referenced this issue Oct 10, 2023
Adds `init` functions for the server and client side of the Astro SDK
with tests.

For now, most of what these functions do is set the SDK metadata. On the
client side, we add BrowserTracing, similarly to Next/SvelteKit.

ref #9182
Lms24 added a commit that referenced this issue Oct 13, 2023
This PR adds the `@sentry/astro` NPM publishing target so that we can
publish the SDK with the next release.

ref #9182
Lms24 added a commit that referenced this issue Oct 13, 2023
Adding [specific
keywords](https://docs.astro.build/en/reference/publish-to-npm/#integrations-library)
to an NPM package makes them show up in [Astro's integration library
page](https://astro.build/integrations/). This PR adds them to the Astro
package.json.

ref #9182
@Lms24
Copy link
Member Author

Lms24 commented Oct 30, 2023

Closing this as the initial alpha release is complete

@Lms24 Lms24 closed this as completed Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: astro Issues related to the Sentry Astro SDK
Projects
Archived in project
Development

No branches or pull requests

2 participants