Unverified Commit 6238b316 authored by Marius van den Beek's avatar Marius van den Beek Committed by GitHub
Browse files

Merge pull request #14205 from dannon/sentry-tweaks

[22.05] Add release tag to client-submitted sentry events
parents 2512cf3b bf3edd06
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -8,10 +8,16 @@ import * as Sentry from "@sentry/browser";
 */
export const initSentry = (galaxy, config) => {
    console.log("initSentry");

    if (config.sentry) {
        const { sentry_dsn_public, email } = config.sentry;
        Sentry.init({ dsn: sentry_dsn_public });
        let release = galaxy.config.version_major;
        if (galaxy.config.version_minor) {
            release += `.${galaxy.config.version_minor}`;
        }
        Sentry.init({
            dsn: sentry_dsn_public,
            release: release,
        });
        if (email) {
            Sentry.configureScope((scope) => {
                scope.setUser({