https://github.com/s1gr1d/sentry-browser-extension-example
Example of invalid use of Sentry inside a browser extension.
https://github.com/s1gr1d/sentry-browser-extension-example
Last synced: 3 months ago
JSON representation
Example of invalid use of Sentry inside a browser extension.
- Host: GitHub
- URL: https://github.com/s1gr1d/sentry-browser-extension-example
- Owner: s1gr1d
- License: mit
- Created: 2024-03-01T08:42:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-17T12:33:20.000Z (about 1 year ago)
- Last Synced: 2024-10-11T20:29:13.796Z (8 months ago)
- Language: TypeScript
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Browser Extension with invalid Sentry usage
This is a test application for the following PR: https://github.com/getsentry/sentry-javascript/pull/10844
`Sentry.init` should [not be used in browser extensions](https://docs.sentry.io/platforms/javascript/troubleshooting/#setting-up-sentry-in-shared-environments-eg-browser-extensions).
However, with this test application you can see if the error shows up in the console.## Development Setup
This application uses [pnpm](https://pnpm.io/installation). Run the application with `pnpm run dev`.
---
Load the unpacked extension (the `dist` directory) into the extensions directory of your browser.
- Chrome: [How-to](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked).
- Firefox: [How-to](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#trying_it_out)