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 trackComponents allowlist should match for components without <> #13510

Closed
3 tasks done
Lms24 opened this issue Aug 28, 2024 · 1 comment · Fixed by #13543
Closed
3 tasks done

Vue trackComponents allowlist should match for components without <> #13510

Lms24 opened this issue Aug 28, 2024 · 1 comment · Fixed by #13543
Labels
Meta: Help Wanted Package: vue Issues related to the Sentry Vue SDK

Comments

@Lms24
Copy link
Member

Lms24 commented Aug 28, 2024

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/vue

SDK Version

8.26.0

Framework Version

Vue 3, possibly Vue 2

Link to Sentry event

No response

Reproduction Example/SDK Setup

Configure component tracking in the Vue SDK with an allowlist which components should be tracked like so

Sentry.init({
  //...
  trackComponents: [
    "App",
    "RwvHeader",
    "RwvFooter",
    "RwvArticleList",
    "Pagination",
  ],
})

Steps to Reproduce

Configure SDK as shown above

Expected Result

Only the components mentioned in trackComponents will get component lifecycle spans

Actual Result

As reported in #13484, no spans at all are recorded because the list doesn't match any of the internally formatted component names. Instead, what users would need to enter is:

Sentry.init({
  //...
  trackComponents: [
    "<App>",
    "<RwvHeader>",
    "<RwvFooter>",
    "<RwvArticleList>",
    "<Pagination>",
  ],
})

which is very unintuitive.

To solve this, we should match for both, the component name with and without angle brackets. We should continue to match with <> to not break existing setups where users figured this out already.

@github-actions github-actions bot added the Package: vue Issues related to the Sentry Vue SDK label Aug 28, 2024
filips123 added a commit to filips123/GimVicUrnik that referenced this issue Sep 1, 2024
This temporarily disables Sentry Vue component tracking until Sentry issues are resolved:

* getsentry/sentry-javascript#13510
* getsentry/sentry-javascript#13546
@Lms24
Copy link
Member Author

Lms24 commented Sep 9, 2024

This was fixed in #13543 and will be included in the next release (8.29.0)

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
Projects
None yet
1 participant