Laravel offers two starter kits, Breeze and Jetstream with optionally bootstrap an application with JavaScript frameworks like Vue.js or React (with Interia.js) or Livewire.
When installing the Laravel SDK, prompt the user if they also want to install an JavaScript SDK to report frontend errors to Sentry
Update their package.json, and run npm/yarn/pnpm install
Display a simple code snippet users need to add to their main.{js|ts} file
We reuse the same DSN as the Laravel application for now
The focus is on frontend error reporting, performance monitoring might be added in the future.
Vue.js snippet
import * as Sentry from "@sentry/vue";
import { BrowserTracing } from "@sentry/tracing";
Sentry.init({
app,
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
integrations: [new BrowserTracing()],
});
React snippet
import * as Sentry from "@sentry/react";
import { BrowserTracing } from "@sentry/tracing";
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
integrations: [new BrowserTracing()],
});
Laravel offers two starter kits, Breeze and Jetstream with optionally bootstrap an application with JavaScript frameworks like Vue.js or React (with Interia.js) or Livewire.
package.json
, and runnpm/yarn/pnpm install
main.{js|ts} file
The focus is on frontend error reporting, performance monitoring might be added in the future.
Vue.js snippet
React snippet
Livewire snippet