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: filter expression not being sent on reconnect (#9720)

Yunus M127e760b0085
diff --git a/frontend/src/container/LiveLogs/LiveLogsContainer/index.tsx b/frontend/src/container/LiveLogs/LiveLogsContainer/index.tsx
index 0c2ecbf53c..06a6595ac8 100644
--- a/frontend/src/container/LiveLogs/LiveLogsContainer/index.tsx
+++ b/frontend/src/container/LiveLogs/LiveLogsContainer/index.tsx
@@ -175,7 +175,18 @@ function LiveLogsContainer(): JSX.Element {
if (isConnectionError && reconnectDueToError) {
// Small delay to prevent immediate reconnection attempts
const reconnectTimer = setTimeout(() => {
- handleStartNewConnection();
+ const fallbackFilterExpression =
+ prevFilterExpressionRef.current ||
+ currentQuery?.builder.queryData[0]?.filter?.expression?.trim() ||
+ null;
+
+ const validationResult = validateQuery(fallbackFilterExpression || '');
+
+ if (validationResult.isValid) {
+ handleStartNewConnection(fallbackFilterExpression);
+ } else {
+ handleStartNewConnection(null);
+ }
}, 1000);
return (): void => clearTimeout(reconnectTimer);
@@ -186,6 +197,7 @@ function LiveLogsContainer(): JSX.Element {
reconnectDueToError,
compositeQuery,
handleStartNewConnection,
+ currentQuery,
]);
// clean up the connection when the component unmounts