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: update no logs text and link based on the datasource (#4594)

Yunus Mf9eddc9b18f6
diff --git a/frontend/src/container/LogsExplorerList/index.tsx b/frontend/src/container/LogsExplorerList/index.tsx
index c4bba5291b..dbc38b7923 100644
--- a/frontend/src/container/LogsExplorerList/index.tsx
+++ b/frontend/src/container/LogsExplorerList/index.tsx
@@ -161,7 +161,7 @@ function LogsExplorerList({
!isFetching &&
!isError &&
!isFilterApplied &&
- logs.length === 0 && <NoLogs />}
+ logs.length === 0 && <NoLogs dataSource={DataSource.LOGS} />}
{!isLoading &&
!isFetching &&
diff --git a/frontend/src/container/LogsExplorerViews/index.tsx b/frontend/src/container/LogsExplorerViews/index.tsx
index 4b639ed505..49b5842908 100644
--- a/frontend/src/container/LogsExplorerViews/index.tsx
+++ b/frontend/src/container/LogsExplorerViews/index.tsx
@@ -611,6 +611,7 @@ function LogsExplorerViews({
data={data}
isError={isError}
isFilterApplied={!isEmpty(listQuery?.filters.items)}
+ dataSource={DataSource.LOGS}
/>
)}
diff --git a/frontend/src/container/NoLogs/NoLogs.tsx b/frontend/src/container/NoLogs/NoLogs.tsx
index 1274bdb20a..7745d130f3 100644
--- a/frontend/src/container/NoLogs/NoLogs.tsx
+++ b/frontend/src/container/NoLogs/NoLogs.tsx
@@ -2,25 +2,31 @@ import './NoLogs.styles.scss';
import { Typography } from 'antd';
import { ArrowUpRight } from 'lucide-react';
+import { DataSource } from 'types/common/queryBuilder';
-export default function NoLogs(): JSX.Element {
+export default function NoLogs({
+ dataSource,
+}: {
+ dataSource: DataSource;
+}): JSX.Element {
return (
<div className="no-logs-container">
<div className="no-logs-container-content">
<img className="eyes-emoji" src="/Images/eyesEmoji.svg" alt="eyes emoji" />
<Typography className="no-logs-text">
- No logs yet.
+ No {dataSource} yet.
<span className="sub-text">
- When we receive logs, they would show up here
+ {' '}
+ When we receive {dataSource}, they would show up here
</span>
</Typography>
<Typography.Link
className="send-logs-link"
- href="https://signoz.io/docs/userguide/logs/"
+ href={`https://signoz.io/docs/userguide/${dataSource}/`}
target="_blank"
>
- Sending Logs to SigNoz <ArrowUpRight size={16} />
+ Sending {dataSource} to SigNoz <ArrowUpRight size={16} />
</Typography.Link>
</div>
</div>
diff --git a/frontend/src/container/TimeSeriesView/TimeSeriesView.tsx b/frontend/src/container/TimeSeriesView/TimeSeriesView.tsx
index 8bac60b425..bd7f32b153 100644
--- a/frontend/src/container/TimeSeriesView/TimeSeriesView.tsx
+++ b/frontend/src/container/TimeSeriesView/TimeSeriesView.tsx
@@ -14,6 +14,7 @@ import { useSelector } from 'react-redux';
import { AppState } from 'store/reducers';
import { SuccessResponse } from 'types/api';
import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';
+import { DataSource } from 'types/common/queryBuilder';
import { GlobalReducer } from 'types/reducer/globalTime';
import { getTimeRange } from 'utils/getTimeRange';
@@ -25,6 +26,7 @@ function TimeSeriesView({
isError,
yAxisUnit,
isFilterApplied,
+ dataSource,
}: TimeSeriesViewProps): JSX.Element {
const graphRef = useRef<HTMLDivElement>(null);
@@ -93,7 +95,7 @@ function TimeSeriesView({
chartData[0]?.length === 0 &&
!isLoading &&
!isError &&
- !isFilterApplied && <NoLogs />}
+ !isFilterApplied && <NoLogs dataSource={dataSource} />}
{!isLoading &&
!isError &&
@@ -111,6 +113,7 @@ interface TimeSeriesViewProps {
isLoading: boolean;
isError: boolean;
isFilterApplied: boolean;
+ dataSource: DataSource;
}
TimeSeriesView.defaultProps = {
diff --git a/frontend/src/container/TimeSeriesView/index.tsx b/frontend/src/container/TimeSeriesView/index.tsx
index b2c6b3f01f..4acffd7e61 100644
--- a/frontend/src/container/TimeSeriesView/index.tsx
+++ b/frontend/src/container/TimeSeriesView/index.tsx
@@ -74,6 +74,7 @@ function TimeSeriesViewContainer({
isLoading={isLoading}
data={responseData}
yAxisUnit={isValidToConvertToMs ? 'ms' : 'short'}
+ dataSource={dataSource}
/>
);
}