question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inertia init Sentry

See original GitHub issue

Last reply in issue https://github.com/getsentry/sentry/issues/32246

Sentry Logger [Log]: Integration installed: InboundFilters
app.js?id=b8cdcdb7d93649f7781b:2 Sentry Logger [Log]: Integration installed: FunctionToString
app.js?id=b8cdcdb7d93649f7781b:2 Sentry Logger [Log]: Integration installed: TryCatch
app.js?id=b8cdcdb7d93649f7781b:2 Sentry Logger [Log]: Integration installed: Breadcrumbs
app.js?id=b8cdcdb7d93649f7781b:2 Sentry Logger [Log]: Integration installed: GlobalHandlers
app.js?id=b8cdcdb7d93649f7781b:2 Sentry Logger [Log]: Integration installed: LinkedErrors
app.js?id=b8cdcdb7d93649f7781b:2 Sentry Logger [Log]: Integration installed: Dedupe
app.js?id=b8cdcdb7d93649f7781b:2 Sentry Logger [Log]: Integration installed: UserAgent
app.js?id=b8cdcdb7d93649f7781b:2 Sentry Logger [Warn]: Misconfigured SDK. Vue specific errors will not be captured.
Update your `Sentry.init` call with an appropriate config option:
`app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).

It looks like the VM variable I am passing its not being detected as a Vue3 app only in production? hmm…

_Originally posted by @fershopls in https://github.com/getsentry/sentry/issues/32246#issuecomment-1059811930_

Code provided by @fershopls:

createInertiaApp({
    title: (title) => `${title} - ${appName}`,
    resolve: (name) => require(`./Pages/${name}.vue`),
    setup({ el, app, props, plugin }) {
        const vm = createApp({ render: () => h(app, props) });
        
        console.log("sentry");
        Sentry.init({
            vm,
            dsn: "MY-DSN",
            // Set tracesSampleRate to 1.0 to capture 100%
            // of transactions for performance monitoring.
            // We recommend adjusting this value in production
            tracesSampleRate: 1.0,
            logErrors: true,
        });

        vm.use(plugin)
            .use(UtilsInstaller)
            .mixin({ methods: { route } });

        // Use global components
        RegisterGlobalComponents(vm);

        vm.config.unwrapInjectedRef = true;

        vm.mount(el);
    },
});

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
christianschoenmakerscommented, Dec 7, 2022

@lforst Yeah sure! I created this issue because the original one was closed and I was not able to find any post with the solution

0reactions
lforstcommented, Dec 7, 2022

Ah, ok. So just for my understanding: You opened this issue to give an update that you could resolve your original issue. Is that correct? 😄

If so, and if that is ok for you I will close this issue, just to clean up our issue feed. I hope that this thread will still be found via google.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application ( with php8.1 InertiaJS Laravel8 Vue3) and Sentry ...
My question is: Can we integrate VueJS3 and Inertia with Sentry? ... https://docs.sentry.io/platforms/javascript/guides/vue/#vue-3---manual-initialization.
Read more >
Vue - Sentry Documentation
On this page, we get you up and running with Sentry's SDK, so that it will ... To initialize Sentry in your Vue...
Read more >
Sentry/vue is not reporting errors in production. Misconfigured ...
When I run npm build, this is the error that shows up in the console: [@sentry/vue]: Misconfigured SDK. Vue specific errors will not...
Read more >
Client-side setup - Inertia.js
All we're doing here is initializing the client-side framework with the base Inertia component. Vue 2. Vue 3. React Svelte. import { createApp,...
Read more >
Vue - Sentry Documentation
Learn how to use Sentry with your Vue application. ... import Vue from "vue"; import * as Sentry from '@sentry/vue'; Sentry.init({ Vue: Vue, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found