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.

fix: error is now handled and displayed as antd notification message

Palash gupta4fa5ff9319b7
diff --git a/frontend/src/pages/Metrics/index.tsx b/frontend/src/pages/Metrics/index.tsx
index 879414ec4b..a47229ad5c 100644
--- a/frontend/src/pages/Metrics/index.tsx
+++ b/frontend/src/pages/Metrics/index.tsx
@@ -1,3 +1,4 @@
+import { notification } from 'antd';
import getLocalStorageKey from 'api/browser/localstorage/get';
import Spinner from 'components/Spinner';
import { SKIP_ONBOARDING } from 'constants/onboarding';
@@ -20,10 +21,20 @@ function Metrics({ getService }: MetricsProps): JSX.Element {
AppState,
GlobalReducer
>((state) => state.globalTime);
- const { services, resourceAttributeQueries } = useSelector<
- AppState,
- MetricReducer
- >((state) => state.metrics);
+ const {
+ services,
+ resourceAttributeQueries,
+ error,
+ errorMessage,
+ } = useSelector<AppState, MetricReducer>((state) => state.metrics);
+
+ useEffect(() => {
+ if (error) {
+ notification.error({
+ message: errorMessage,
+ });
+ }
+ }, [error, errorMessage]);
const selectedTags = useMemo(
() =>