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
live tail api excluded from timeout middleware
nityanandagohain2132d1059cc4
diff --git a/pkg/query-service/app/server.go b/pkg/query-service/app/server.goindex 77ab3fc9b9..b2fbe2df5a 100644--- a/pkg/query-service/app/server.go+++ b/pkg/query-service/app/server.go@@ -242,8 +242,14 @@ func (s *Server) analyticsMiddleware(next http.Handler) http.Handler {func setTimeoutMiddleware(next http.Handler) http.Handler {return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {- ctx, cancel := context.WithTimeout(r.Context(), constants.ContextTimeout*time.Second)- defer cancel()+ ctx := r.Context()+ var cancel context.CancelFunc+ // check if route is not excluded+ url := r.URL.Path+ if _, ok := constants.TimeoutExcludedRoutes[url]; !ok {+ ctx, cancel = context.WithTimeout(r.Context(), constants.ContextTimeout*time.Second)+ defer cancel()+ }r = r.WithContext(ctx)next.ServeHTTP(w, r)diff --git a/pkg/query-service/constants/constants.go b/pkg/query-service/constants/constants.goindex 8f590d81ba..e5e727de0b 100644--- a/pkg/query-service/constants/constants.go+++ b/pkg/query-service/constants/constants.go@@ -81,6 +81,10 @@ const (SIGNOZ_TIMESERIES_TABLENAME = "time_series_v2")+var TimeoutExcludedRoutes = map[string]bool{+ "/api/v1/logs/tail": true,+}+// alert related constantsconst (// AlertHelpPage is used in case default alert repo url is not set