root: replace django-silk with Spotlight (#7828)
* root: replace django-silk with Spotlight https://spotlightjs.com/ Signed-off-by: Jens Langhammer <jens@goauthentik.io> * use containerized spotlight Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix lock Signed-off-by: Jens Langhammer <jens@goauthentik.io> * update spotlight version Signed-off-by: Jens Langhammer <jens@goauthentik.io> * remove platform Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix lint Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -5,7 +5,7 @@ import { me } from "@goauthentik/common/users";
|
||||
import * as Sentry from "@sentry/browser";
|
||||
import { Integrations } from "@sentry/tracing";
|
||||
|
||||
import { Config, ResponseError } from "@goauthentik/api";
|
||||
import { CapabilitiesEnum, Config, ResponseError } from "@goauthentik/api";
|
||||
|
||||
export const TAG_SENTRY_COMPONENT = "authentik.component";
|
||||
export const TAG_SENTRY_CAPABILITIES = "authentik.capabilities";
|
||||
@ -60,6 +60,11 @@ export async function configureSentry(canDoPpi = false): Promise<Config> {
|
||||
scope.setTransactionName(`authentik.web.if.${currentInterface()}`),
|
||||
);
|
||||
}
|
||||
if (cfg.capabilities.includes(CapabilitiesEnum.CanDebug)) {
|
||||
const Spotlight = await import("@spotlightjs/spotlight");
|
||||
|
||||
Spotlight.init({ injectImmediately: true });
|
||||
}
|
||||
if (cfg.errorReporting.sendPii && canDoPpi) {
|
||||
me().then((user) => {
|
||||
Sentry.setUser({ email: user.user.email });
|
||||
|
Reference in New Issue
Block a user