Skip to content

The only tool you need to know what is happening and how to fix it.

feat: hide metrics for cloudflare + feat: ability to test exceptions

ddux5133511c11b1
diff --git a/frontend/src/lib/components/app-sidebar.svelte b/frontend/src/lib/components/app-sidebar.svelte
index ec506e29..27cd3260 100644
--- a/frontend/src/lib/components/app-sidebar.svelte
+++ b/frontend/src/lib/components/app-sidebar.svelte
@@ -12,7 +12,7 @@
BookOpen
} from '@lucide/svelte';
import { themeState } from '$lib/state/theme.svelte';
- import { projectsState, isFrontendFramework } from '$lib/state/projects.svelte';
+ import { projectsState, isFrontendFramework, isCloudflareFramework } from '$lib/state/projects.svelte';
import { LayoutDashboard } from '@lucide/svelte';
import { page } from '$app/state';
import { createRowClickHandler } from '$lib/utils/navigation';
@@ -27,6 +27,7 @@
}
const hiddenForFrontend = new Set(['Dashboard', 'Endpoints', 'Tasks', 'Metrics']);
+ const hiddenForCloudflare = new Set(['Metrics']);
const allSidebarItems: SidebarItem[] = [
{ Icon: LayoutDashboard, href: '/', title: 'Dashboard', stickyParams: [] },
@@ -45,7 +46,9 @@
const sidebarItems = $derived(
projectsState.currentProject && isFrontendFramework(projectsState.currentProject.framework)
? allSidebarItems.filter((item) => !hiddenForFrontend.has(item.title))
- : allSidebarItems
+ : projectsState.currentProject && isCloudflareFramework(projectsState.currentProject.framework)
+ ? allSidebarItems.filter((item) => !hiddenForCloudflare.has(item.title))
+ : allSidebarItems
);
const allSidebarItemsBottom: SidebarItem[] = [
diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte
index f18795ed..34917e81 100644
--- a/frontend/src/routes/+layout.svelte
+++ b/frontend/src/routes/+layout.svelte
@@ -48,6 +48,7 @@
onMount(() => {
initTheme();
+ (window as any).captureException = captureException;
if (authState.isAuthenticated) {
projectsState.loadProjects();