-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Realtime tracking of javascript bugs and errors #68
Comments
@Raruto this thing could be nice. G3W-ADMIN had previously used for Django and Python Sentry https://github.com/g3w-suite/g3w-admin/blob/07ba465011bb0ef95393b4d31255996fbec55e11/g3w-admin/base/settings/__init__.py#L39, now it could be time to reactivate it and update it to the latest version of sentry-sdk. We already have an account. |
At least for the demo version .. for customers we will see, perhaps for those who are hosted by us. |
Sentry can be installed via various JS bundles, for example here is the official documentatiotn on How to setup Vue and Sentry integration. But anyway (as per g3w-client v3.7) there seems to be some sort of incompatibility with the current code structure and the use of Sentry as a javascript module. However, the fastest way to do some testing is to include sentry via cdn (ref: https://docs.sentry.io/platforms/javascript/install/) • g3w-admin/client/templates/client/index.html<body class="hold-transition skin-{{ skin_class|default:'blue' }} fixed {% if sidebar_collapse %} sidebar-collapse {% endif %}" >
<script src="https://browser.sentry-cdn.com/7.9.0/bundle.tracing.min.js" integrity="sha384-a80B6QRSQ+pPpoX+H79BVaE52KTvYkQDL+lD8+TajwMxswO+ywB3p99gWNraTNrt" crossorigin="anonymous"></script>
<script>
if (Sentry) {
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
// Alternatively, use `process.env.npm_package_version` for a dynamic release version if your build tool supports it.
release: "g3w-client@3.5-dev",
integrations: [new Sentry.BrowserTracing()],
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
});
}
</script>
<div id="app">
<app></app>
</div>
...
<script>
myUndefinedFunction(); // intentionally trigger a javascript error, login into your https://sentry.io/ account for viewing the trace log
</script>
... |
At least for the public demo application it might be worth introducing a tracking script that can promptly report javascript errors to the development team, for example: sentry.io.
latter it could be added to customer applications but first it would be necessary to create a more compliant privacy and cookie policy.
The text was updated successfully, but these errors were encountered: