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: added a filter on initial log fetch based on activelogid param

Sahil2e585acc787c
diff --git a/frontend/src/components/Logs/RawLogView/styles.ts b/frontend/src/components/Logs/RawLogView/styles.ts
index 97288ba1de..db7b9f2176 100644
--- a/frontend/src/components/Logs/RawLogView/styles.ts
+++ b/frontend/src/components/Logs/RawLogView/styles.ts
@@ -46,7 +46,7 @@ export const RawLogViewContainer = styled(Row)<{
${({ $isHightlightedLog, $isDarkMode }): string =>
$isHightlightedLog
? `background-color: ${
- $isDarkMode ? Color.BG_SLATE_500 : Color.BG_VANILLA_300
+ $isDarkMode ? Color.BG_ROBIN_600 : Color.BG_VANILLA_400
};
transition: background-color 2s ease-in;`
: ''}
diff --git a/frontend/src/container/LogsExplorerViews/index.tsx b/frontend/src/container/LogsExplorerViews/index.tsx
index 5da30af83a..edbaf342a3 100644
--- a/frontend/src/container/LogsExplorerViews/index.tsx
+++ b/frontend/src/container/LogsExplorerViews/index.tsx
@@ -15,6 +15,7 @@ import {
initialFilters,
initialQueriesMap,
initialQueryBuilderFormValues,
+ OPERATORS,
PANEL_TYPES,
} from 'constants/queryBuilder';
import { DEFAULT_PER_PAGE_VALUE } from 'container/Controls/config';
@@ -313,6 +314,29 @@ function LogsExplorerViews({
pageSize: params.pageSize,
});
+ // Add filter for activeLogId if present
+ let updatedFilters = paginateData.filters;
+ if (activeLogId) {
+ updatedFilters = {
+ ...paginateData.filters,
+ items: [
+ ...(paginateData.filters?.items || []),
+ {
+ id: v4(),
+ key: {
+ key: 'id',
+ type: '',
+ dataType: DataTypes.String,
+ isColumn: true,
+ },
+ op: OPERATORS['<='],
+ value: activeLogId,
+ },
+ ],
+ op: 'AND',
+ };
+ }
+
const queryData: IBuilderQuery[] =
query.builder.queryData.length > 1
? query.builder.queryData
@@ -320,6 +344,7 @@ function LogsExplorerViews({
{
...(listQuery || initialQueryBuilderFormValues),
...paginateData,
+ ...(updatedFilters ? { filters: updatedFilters } : {}),
},
];
@@ -333,7 +358,7 @@ function LogsExplorerViews({
return data;
},
- [orderByTimestamp, listQuery],
+ [orderByTimestamp, listQuery, activeLogId],
);
const handleEndReached = useCallback(
diff --git a/frontend/src/hooks/logs/configs.ts b/frontend/src/hooks/logs/configs.ts
index 12dc8d9615..2cd2ee5395 100644
--- a/frontend/src/hooks/logs/configs.ts
+++ b/frontend/src/hooks/logs/configs.ts
@@ -1 +1 @@
-export const HIGHLIGHTED_DELAY = 10000;
+export const HIGHLIGHTED_DELAY = 120000;
diff --git a/frontend/src/utils/logs.ts b/frontend/src/utils/logs.ts
index b230a678e3..14e919eb31 100644
--- a/frontend/src/utils/logs.ts
+++ b/frontend/src/utils/logs.ts
@@ -39,7 +39,7 @@ export const getActiveLogBackground = (
return `background-color: ${Color.BG_SLATE_200} !important;`;
}
}
- return `background-color: ${Color.BG_VANILLA_300}!important; color: ${Color.TEXT_SLATE_400} !important;`;
+ return `background-color: ${Color.BG_VANILLA_400}!important; color: ${Color.TEXT_SLATE_400} !important;`;
};
export const getHightLightedLogBackground = (