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: table view logs on expand is updated (#3286)

Palash Guptac6ac8df70774
diff --git a/frontend/src/components/Logs/TableView/types.ts b/frontend/src/components/Logs/TableView/types.ts
index d5a456182d..446e99f32c 100644
--- a/frontend/src/components/Logs/TableView/types.ts
+++ b/frontend/src/components/Logs/TableView/types.ts
@@ -10,6 +10,7 @@ export type LogsTableViewProps = {
logs: ILog[];
fields: IField[];
linesPerRow: number;
+ onClickExpand?: (log: ILog) => void;
};
export type UseTableViewResult = {
diff --git a/frontend/src/container/LogsTable/index.tsx b/frontend/src/container/LogsTable/index.tsx
index 729b9c6b94..2acfdc9a13 100644
--- a/frontend/src/container/LogsTable/index.tsx
+++ b/frontend/src/container/LogsTable/index.tsx
@@ -5,6 +5,7 @@ import RawLogView from 'components/Logs/RawLogView';
import LogsTableView from 'components/Logs/TableView';
import Spinner from 'components/Spinner';
import { contentStyle } from 'container/Trace/Search/config';
+import { useActiveLog } from 'hooks/logs/useActiveLog';
import useFontFaceObserver from 'hooks/useFontObserver';
import { memo, useCallback, useMemo } from 'react';
import { useSelector } from 'react-redux';
@@ -26,6 +27,8 @@ type LogsTableProps = {
function LogsTable(props: LogsTableProps): JSX.Element {
const { viewMode, linesPerRow } = props;
+ const { onSetActiveLog } = useActiveLog();
+
useFontFaceObserver(
[
{
@@ -72,7 +75,12 @@ function LogsTable(props: LogsTableProps): JSX.Element {
const renderContent = useMemo(() => {
if (viewMode === 'table') {
return (
- <LogsTableView logs={logs} fields={selected} linesPerRow={linesPerRow} />
+ <LogsTableView
+ onClickExpand={onSetActiveLog}
+ logs={logs}
+ fields={selected}
+ linesPerRow={linesPerRow}
+ />
);
}
@@ -85,7 +93,7 @@ function LogsTable(props: LogsTableProps): JSX.Element {
/>
</Card>
);
- }, [getItemContent, linesPerRow, logs, selected, viewMode]);
+ }, [getItemContent, linesPerRow, logs, onSetActiveLog, selected, viewMode]);
if (isLoading) {
return <Spinner height={20} tip="Getting Logs" />;