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.

fixed - now getting latest data for past time rather than get 30s stale there too

Ankit Nayan9c6e66f3158c
diff --git a/pkg/query-service/app/parser.go b/pkg/query-service/app/parser.go
index 1bc9d1f38d..692fc8b74e 100644
--- a/pkg/query-service/app/parser.go
+++ b/pkg/query-service/app/parser.go
@@ -421,7 +421,10 @@ func parseTimeMinusBuffer(param string, r *http.Request) (*time.Time, error) {
return nil, fmt.Errorf("%s param is not in correct timestamp format", param)
}
- timeUnix = timeUnix - 30000000000
+ timeUnixNow := time.Now().UnixNano()
+ if timeUnix > timeUnixNow-30000000000 {
+ timeUnix = timeUnix - 30000000000
+ }
timeFmt := time.Unix(0, timeUnix)