Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore: removed alertRuleProvider from global state (#9648)

Abhi kumarc08e52094158
diff --git a/frontend/src/AppRoutes/index.tsx b/frontend/src/AppRoutes/index.tsx
index 71e7d376ef..abe6746448 100644
--- a/frontend/src/AppRoutes/index.tsx
+++ b/frontend/src/AppRoutes/index.tsx
@@ -22,7 +22,6 @@ import { StatusCodes } from 'http-status-codes';
import history from 'lib/history';
import ErrorBoundaryFallback from 'pages/ErrorBoundaryFallback/ErrorBoundaryFallback';
import posthog from 'posthog-js';
-import AlertRuleProvider from 'providers/Alert';
import { useAppContext } from 'providers/App/App';
import { IUser } from 'providers/App/types';
import { DashboardProvider } from 'providers/Dashboard/Dashboard';
@@ -374,26 +373,24 @@ function App(): JSX.Element {
<QueryBuilderProvider>
<DashboardProvider>
<KeyboardHotkeysProvider>
- <AlertRuleProvider>
- <AppLayout>
- <PreferenceContextProvider>
- <Suspense fallback={<Spinner size="large" tip="Loading..." />}>
- <Switch>
- {routes.map(({ path, component, exact }) => (
- <Route
- key={`${path}`}
- exact={exact}
- path={path}
- component={component}
- />
- ))}
- <Route exact path="/" component={Home} />
- <Route path="*" component={NotFound} />
- </Switch>
- </Suspense>
- </PreferenceContextProvider>
- </AppLayout>
- </AlertRuleProvider>
+ <AppLayout>
+ <PreferenceContextProvider>
+ <Suspense fallback={<Spinner size="large" tip="Loading..." />}>
+ <Switch>
+ {routes.map(({ path, component, exact }) => (
+ <Route
+ key={`${path}`}
+ exact={exact}
+ path={path}
+ component={component}
+ />
+ ))}
+ <Route exact path="/" component={Home} />
+ <Route path="*" component={NotFound} />
+ </Switch>
+ </Suspense>
+ </PreferenceContextProvider>
+ </AppLayout>
</KeyboardHotkeysProvider>
</DashboardProvider>
</QueryBuilderProvider>
diff --git a/frontend/src/pages/AlertDetails/index.tsx b/frontend/src/pages/AlertDetails/index.tsx
index aa6eb0b819..1d3c58d8a3 100644
--- a/frontend/src/pages/AlertDetails/index.tsx
+++ b/frontend/src/pages/AlertDetails/index.tsx
@@ -1,3 +1,13 @@
+import AlertRuleProvider from 'providers/Alert';
+
import AlertDetails from './AlertDetails';
-export default AlertDetails;
+function AlertDetailsPage(): JSX.Element {
+ return (
+ <AlertRuleProvider>
+ <AlertDetails />
+ </AlertRuleProvider>
+ );
+}
+
+export default AlertDetailsPage;