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

Vue SDK doesn't create root application loading span in Vue 3 apps #5910

Closed
4 of 5 tasks
Lms24 opened this issue Oct 7, 2022 · 4 comments · Fixed by #5983
Closed
4 of 5 tasks

Vue SDK doesn't create root application loading span in Vue 3 apps #5910

Lms24 opened this issue Oct 7, 2022 · 4 comments · Fixed by #5983
Assignees
Labels
Meta: Help Wanted Package: vue Issues related to the Sentry Vue SDK Type: Bug

Comments

@Lms24
Copy link
Member

Lms24 commented Oct 7, 2022

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/vue

SDK Version

7.14.2

Framework Version

Vue 3

Link to Sentry event

No response

Steps to Reproduce

  1. Create Vue 3 app with a few components
  2. In main.ts:
import { createApp } from "vue";

import * as Sentry from "@sentry/vue";
import { BrowserTracing } from "@sentry/tracing";

import App from "./App.vue";
import router from "./router";
import { ENVIRONMENT, VERSION } from "./info";

const app = createApp(App);

Sentry.init({
  app,
  dsn: "https://[email protected]/6391918",
  integrations: [
    new BrowserTracing({
      routingInstrumentation: Sentry.vueRouterInstrumentation(router),
      tracingOrigins: ["localhost",  /^\//],
    }),
  ],
  tracesSampleRate: 1.0,
  trackComponents: true,
  debug: true,
});

app.use(router);
app.mount("#app");

Expected Result

According to docs soon as the SDK is initialized (without any additional component tracking config), the ui.vue.render root application loading span should be added to the ongoing pageload transaction.

Actual Result

ui.vue.render is not added to the ongoing transaction in a Vue 3 app

To do:

@Lms24 Lms24 added Type: Bug Package: vue Issues related to the Sentry Vue SDK labels Oct 7, 2022
@Lms24 Lms24 changed the title Vue SDK component tracking doesn't create root span in Vue 3 apps Vue SDK doesn't create root application loading span in Vue 3 apps Oct 7, 2022
@Lms24
Copy link
Member Author

Lms24 commented Oct 17, 2022

I created a small Vue2 test app (pita setting up legacy projects...)

Seems like, the root rendering span is created but the child component spans are not. trackComponents set to true

@Lms24
Copy link
Member Author

Lms24 commented Oct 17, 2022

The reason why the root span isn't created is because at the time when the App component is initialized, it seems like our pageload transaction wasn't yet started.

@AbhiPrasad
Copy link
Member

If we're going to make this support vue router v2,v3,v4, we should make sure we also update the docs to include this information.

@Lms24
Copy link
Member Author

Lms24 commented Oct 18, 2022

So we're not technically not supporting anything new with the changes in #5983. Our instrumentation seemed to work with vue router 3 and 4 well, except for the later start of the pageload txn.
But yes, we should def. update docs, gonna open up an issue for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Meta: Help Wanted Package: vue Issues related to the Sentry Vue SDK Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants