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.

correct var names in live tail

nityanandagohain051f64010064
diff --git a/pkg/query-service/app/http_handler.go b/pkg/query-service/app/http_handler.go
index d5ef57164c..a2f55fec60 100644
--- a/pkg/query-service/app/http_handler.go
+++ b/pkg/query-service/app/http_handler.go
@@ -1943,13 +1943,12 @@ func (aH *APIHandler) tailLogs(w http.ResponseWriter, r *http.Request) {
return
}
- loop := true
- for loop {
+ for {
select {
- case ev := <-client.Logs:
+ case log := <-client.Logs:
var buf bytes.Buffer
enc := json.NewEncoder(&buf)
- enc.Encode(ev)
+ enc.Encode(log)
fmt.Fprintf(w, "data: %v\n\n", buf.String())
flusher.Flush()
case <-client.Done: