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.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
use ticker for polling db in live tail.
nityanandagohain047227ad188b
diff --git a/pkg/query-service/app/clickhouseReader/reader.go b/pkg/query-service/app/clickhouseReader/reader.goindex f67fa559eb..b5e6948197 100644--- a/pkg/query-service/app/clickhouseReader/reader.go+++ b/pkg/query-service/app/clickhouseReader/reader.go@@ -2907,6 +2907,8 @@ func (r *ClickHouseReader) TailLogs(ctx context.Context, client *model.LogsTailCidStart = client.Filter.IdStart}+ ticker := time.NewTicker(time.Duration(r.liveTailRefreshSeconds) * time.Second)+ defer ticker.Stop()for {select {case <-ctx.Done():@@ -2914,7 +2916,7 @@ func (r *ClickHouseReader) TailLogs(ctx context.Context, client *model.LogsTailCclient.Done <- &donezap.S().Debug("closing go routine : " + client.Name)return- default:+ case <-ticker.C:// get the new 100 logs as anything more older won't make sensetmpQuery := fmt.Sprintf("%s where timestamp >='%d'", query, tsStart)if filterSql != "" {@@ -2947,7 +2949,6 @@ func (r *ClickHouseReader) TailLogs(ctx context.Context, client *model.LogsTailC}}}- time.Sleep(time.Duration(r.liveTailRefreshSeconds) * time.Second)}}}