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
feat(data-export): support client-provided offset in export_raw_data API (#11825)
Nikhil Soni5f6cc4c2971c
diff --git a/pkg/modules/rawdataexport/implrawdataexport/handler.go b/pkg/modules/rawdataexport/implrawdataexport/handler.goindex a7124cd8d0..74fd47068d 100644--- a/pkg/modules/rawdataexport/implrawdataexport/handler.go+++ b/pkg/modules/rawdataexport/implrawdataexport/handler.go@@ -114,6 +114,10 @@ func validateAndApplyDefaultExportLimits(queries []qbtypes.QueryEnvelope) errorreturn errors.NewInvalidInputf(errors.CodeInvalidInput, "limit cannot be more than %d", MaxExportRowCountLimit)}queries[idx].SetLimit(limit)++ if queries[idx].GetOffset() < 0 {+ return errors.NewInvalidInputf(errors.CodeInvalidInput, "offset must be non-negative")+ }}return nil}diff --git a/pkg/modules/rawdataexport/implrawdataexport/module.go b/pkg/modules/rawdataexport/implrawdataexport/module.goindex f74e9610d0..e36bd9b71b 100644--- a/pkg/modules/rawdataexport/implrawdataexport/module.go+++ b/pkg/modules/rawdataexport/implrawdataexport/module.go@@ -70,12 +70,13 @@ func exportRawDataForSingleQuery(querier querier.Querier, ctx context.Context, oqueries := rangeRequest.CompositeQuery.QueriesrowCountLimit := queries[queryIndex].GetLimit()+ startingOffset := queries[queryIndex].GetOffset()rowCount := 0for rowCount < rowCountLimit {chunkSize := min(ChunkSize, rowCountLimit-rowCount)queries[queryIndex].SetLimit(chunkSize)- queries[queryIndex].SetOffset(rowCount)+ queries[queryIndex].SetOffset(startingOffset + rowCount)response, err := querier.QueryRange(ctx, orgID, rangeRequest)if err != nil {