errortracking: first throw at an implementation
Currently uses a sponsored sentry instance on sentry.io. Error tracking is disabled by default and currently still has to be enabled through manual configuration in config.yaml (plugins.errortracking.enabled=true)
This commit is contained in:
1 parent
6a069de240
commit
f6ec0bca6e
3 files changed
+95
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<script type="text/javascript">
|
||||
var ERRORTRACKING_ENABLED = {% if plugin_errortracking_enabled -%} true; {% else %} false; {%- endif %}
|
||||
|
||||
$(function() {
|
||||
var errortracking_url_coreui = "{{ plugin_errortracking_url_coreui }}";
|
||||
var errortracking_unique_id = "{{ plugin_errortracking_unique_id }}";
|
||||
|
||||
if (ERRORTRACKING_ENABLED) {
|
||||
Sentry.init({
|
||||
dsn: errortracking_url_coreui,
|
||||
release: VERSION
|
||||
});
|
||||
Sentry.configureScope(function (scope) {
|
||||
scope.setUser({"id": errortracking_unique_id});
|
||||
});
|
||||
log.info("Initialized error tracking");
|
||||
|
||||
throw Error("Omg!");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in new issue
Block a user