-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: vueIssues related to the Sentry Vue SDKIssues related to the Sentry Vue SDK
Description
The @sentry/vue package doesn't export all the @sentry/browser exports like @sentry/react does
Vue package
export {
addGlobalEventProcessor,
addBreadcrumb,
captureException,
captureEvent,
captureMessage,
configureScope,
getHubFromCarrier,
getCurrentHub,
Hub,
Scope,
setContext,
setExtra,
setExtras,
setTag,
setTags,
setUser,
startTransaction,
withScope,
} from '@sentry/browser';React package
export * from '@sentry/browser';As a result following the doc, the following will throw an error (because showReportDialog is not exported)
import Vue from "vue";
import * as Sentry from "@sentry/vue";
Sentry.init({
Vue,
environment: process.env.NODE_ENV,
dsn: process.env.VUE_APP_SENTRY_DSN,
beforeSend(event) {
// Check if it is an exception, and if so, show the report dialog
if (event.exception) {
Sentry.showReportDialog({ eventId: event.event_id, user: event.user });
}
return event;
},
});While it's possible to import it from the other package
import { showReportDialog } from "@sentry/browser";It would be best to keep the packages coherent
Metadata
Metadata
Assignees
Labels
Package: vueIssues related to the Sentry Vue SDKIssues related to the Sentry Vue SDK