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

How to prevent @sentry/vite-plugin from injecting Sentry to every file? #591

Open
lilouartz opened this issue Aug 23, 2024 · 4 comments
Open

Comments

@lilouartz
Copy link

Looks like Sentry injects this to every file:

(function() {
    try {
        var r = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}
          , t = new Error().stack;
        t && (r._sentryDebugIds = r._sentryDebugIds || {},
        r._sentryDebugIds[t] = "6af1d399-83b0-4d2d-8d81-2b50af19ad83",
        r._sentryDebugIdIdentifier = "sentry-dbid-6af1d399-83b0-4d2d-8d81-2b50af19ad83")
    } catch {}
}
)();

How do I disable this?

@Lms24
Copy link
Member

Lms24 commented Aug 26, 2024

Hey @lilouartz would you mind letting us know why you want to disable debug id injection? This snippet is injected so that we can better associate the minified stack frames with the correct source maps to show you the unminified stack frames in the Sentry UI.

How do I disable this?

You can give our legacy source maps uploading strategy a try. This won't inject debug id snippets into your code but you'll need to more carefully set up source maps upload

@lilouartz
Copy link
Author

Feels lame that I have to use something named "legacy" for what seems like a basic ask.

@Lms24
Copy link
Member

Lms24 commented Aug 26, 2024

I gave you an alternative. Without having more context as to why you want to achieve this, we cannot prioritize further work.

Hey @lilouartz would you mind letting us know why you want to disable debug id injection?

At this time, we don't understand why this is a "basic ask".

@getsantry
Copy link

getsantry bot commented Sep 17, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Development

No branches or pull requests

2 participants