Sentry (JS) setLevel sets 'fatal' instead of 'critical'

Viewed 91

If i pass the error level 'critical' to the setLevel in the Sentry i see 'fatal'. If I pass 'error' I see 'error'. If I pass same error level to setTag, I see correct value.

Can somebody explain it?

    public logError(error: Error, type: errorType, errorLevel: Severity, extras?: Extras) {
        SentryClient.getAnalyticData().then((analyticData) =>
            this.sentry.withScope((scope: Sentry.Scope) => {
                extras && scope.setExtras({ ...extras, ...analyticData });

                scope.setTag('ERROR_TYPE', type);
                scope.setTag('ERROR_LEVEL', errorLevel);
                scope.setLevel(errorLevel);

                this.sentry.captureMessage(SentryClient.prepareErrorByCode(error, type));
            })
        );
    }
0 Answers
Related