spiegel-keyman/developer/src/tike/xml/app/lib/sentry/init.js.in
Marc Durdin 34ece2182d fix(common): update sentry release identifiers to support semver
Fixes #7895.

This should mean that Sentry reports start to track semantic versions. I
have reviewed each project and I _think_ I've captured all the locations
where we need to construct release identifiers. Note that one of them
was fixed from a plain version number.

Docs on release format: https://docs.sentry.io/platforms/node/guides/serverless-cloud/configuration/releases/#bind-the-version
2023-01-17 17:04:24 +07:00

40 lines
1.1 KiB
JavaScript

// init.js
// Initializes Sentry with Keyman definitions
// This file is dynamically built from init.js.in into init.js
// which allows us to easily populate a release tag. This
// transform is made in TIKE's makefile with mkver
//
// DO NOT MODIFY init.js; instead make changes in init.js.in.
//
Sentry.init({
dsn: 'https://39b25a09410349a58fe12aaf721565af@o1005580.ingest.sentry.io/5983519', // Keyman Developer
environment: '$Environment',
release: 'release@$VersionWithTag'
});
function keymanEnableDiagnostics() {
var e = document.createElement('button');
e.style.zIndex = '1000';
e.style.position = 'fixed';
e.style.right = '10px';
e.style.top = '10px';
e.style.height = '24px';
e.innerText = 'Test Exception';
e.onclick = function() {
var boo = null.boo();
}
document.body.appendChild(e);
e = document.createElement('button');
e.style.zIndex = '1000';
e.style.position = 'fixed';
e.style.right = '10px';
e.style.top = '38px';
e.style.height = '24px';
e.innerText = 'Test Event';
e.onclick = function() {
Sentry.captureMessage('Test Event');
}
document.body.appendChild(e);
}