diff --git a/web/src/api/Sentry.ts b/web/src/api/Sentry.ts index 22790c746..008069359 100644 --- a/web/src/api/Sentry.ts +++ b/web/src/api/Sentry.ts @@ -7,8 +7,9 @@ import { config } from "./Config"; import { Config } from "authentik-api"; export const TAG_SENTRY_COMPONENT = "authentik.component"; +export const TAG_SENTRY_CAPABILITIES = "authentik.capabilities"; -export function configureSentry(canDoPpi: boolean = false, tags: { [key: string]: string; } = {}): Promise { +export function configureSentry(canDoPpi: boolean = false): Promise { return config().then((config) => { if (config.errorReportingEnabled) { Sentry.init({ @@ -53,7 +54,7 @@ export function configureSentry(canDoPpi: boolean = false, tags: { [key: string] return event; }, }); - Sentry.setTags(tags); + Sentry.setTag(TAG_SENTRY_CAPABILITIES, config.capabilities.join(",")); if (window.location.pathname.includes("if/")) { // Get the interface name from URL const intf = window.location.pathname.replace(/.+if\/(.+)\//, "$1");