Hello there! I am trying to get Sentry.io working in my app. Currently, I’ve done the following:
- I installed sentry and the sentry webpack plugin like so:
npm install --save @sentry/browser @sentry/tracing
npm install @sentry/webpack-plugin --save-dev
- I put the code into my
main.ts
file like so:
import * as Sentry from '@sentry/browser';
import { Integrations } from '@sentry/tracing';
Sentry.init({
dsn: 'https://xxx@xxx.ingest.sentry.io/xxx',
integrations: [new Integrations.BrowserTracing()],
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
});
- I added a
.sentryclirc
file with the following:
const SentryCliPlugin = require('@sentry/webpack-plugin');
const config = {
plugins: [
new SentryCliPlugin({
include: '.',
ignoreFile: '.sentrycliignore',
ignore: ['node_modules', 'webpack.config.js'],
configFile: 'sentry.properties',
}),
],
};
- I created a purposeful error in my code like so:
console.log(whatever);
I get the results in Sentry (wahoo!). However, looks like the JS in Sentry looks like so:
webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js?!./src/views/Home.vue?vue&type=script&lang=js
webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js in callWithErrorHandling at line 279:22
webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js in callWithAsyncErrorHandling at line 288:21
webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js in Array.hook.__weh.hook.__weh at line 3024:29
webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js in flushPostFlushCbs at line 479:47
webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js in flushJobs at line 515:9
So I’m assuming I need to upload the source maps. I’ve tried to find easy instructions on how to do that but so far I’ve come up empty. Any guidance to help me get this app up-and-running with proper error handling? Thanks!
6 posts - 2 participants