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
Fix: Update query_range api from v3 to v4 (Logs and Traces) (#7906)
Aditya Singhad392e81ff54
diff --git a/frontend/src/container/LogsExplorerViews/index.tsx b/frontend/src/container/LogsExplorerViews/index.tsxindex ad39c8576e..0009fc405e 100644--- a/frontend/src/container/LogsExplorerViews/index.tsx+++ b/frontend/src/container/LogsExplorerViews/index.tsx@@ -6,7 +6,7 @@ import { getQueryStats, WsDataEvent } from 'api/common/getQueryStats';import logEvent from 'api/common/logEvent';import { getYAxisFormattedValue } from 'components/Graph/yAxisConfig';import LogsFormatOptionsMenu from 'components/LogsFormatOptionsMenu/LogsFormatOptionsMenu';-import { DEFAULT_ENTITY_VERSION } from 'constants/app';+import { ENTITY_VERSION_V4 } from 'constants/app';import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';import { LOCALSTORAGE } from 'constants/localStorage';import { AVAILABLE_EXPORT_PANEL_TYPES } from 'constants/panelTypes';@@ -247,7 +247,7 @@ function LogsExplorerViews({} = useGetExplorerQueryRange(listChartQuery,PANEL_TYPES.TIME_SERIES,- DEFAULT_ENTITY_VERSION,+ ENTITY_VERSION_V4,{enabled: !!listChartQuery && panelType === PANEL_TYPES.LIST,},@@ -265,7 +265,7 @@ function LogsExplorerViews({} = useGetExplorerQueryRange(requestData,panelType,- DEFAULT_ENTITY_VERSION,+ ENTITY_VERSION_V4,{keepPreviousData: true,enabled: !isLimit && !!requestData,diff --git a/frontend/src/container/TimeSeriesView/index.tsx b/frontend/src/container/TimeSeriesView/index.tsxindex c285ab70b6..de8038847d 100644--- a/frontend/src/container/TimeSeriesView/index.tsx+++ b/frontend/src/container/TimeSeriesView/index.tsx@@ -1,4 +1,4 @@-import { DEFAULT_ENTITY_VERSION } from 'constants/app';+import { ENTITY_VERSION_V4 } from 'constants/app';import { initialQueriesMap, PANEL_TYPES } from 'constants/queryBuilder';import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';import { useGetQueryRange } from 'hooks/queryBuilder/useGetQueryRange';@@ -52,7 +52,7 @@ function TimeSeriesViewContainer({dataSource,},},- DEFAULT_ENTITY_VERSION,+ ENTITY_VERSION_V4,{queryKey: [REACT_QUERY_KEY.GET_QUERY_RANGE,diff --git a/frontend/src/container/TracesExplorer/ListView/index.tsx b/frontend/src/container/TracesExplorer/ListView/index.tsxindex 55edba3bdd..78d239453f 100644--- a/frontend/src/container/TracesExplorer/ListView/index.tsx+++ b/frontend/src/container/TracesExplorer/ListView/index.tsx@@ -1,6 +1,6 @@import logEvent from 'api/common/logEvent';import { ResizeTable } from 'components/ResizeTable';-import { DEFAULT_ENTITY_VERSION } from 'constants/app';+import { ENTITY_VERSION_V4 } from 'constants/app';import { LOCALSTORAGE } from 'constants/localStorage';import { QueryParams } from 'constants/query';import { initialQueriesMap, PANEL_TYPES } from 'constants/queryBuilder';@@ -104,7 +104,7 @@ function ListView({ isFilterApplied }: ListViewProps): JSX.Element {selectColumns: options?.selectColumns,},},- DEFAULT_ENTITY_VERSION,+ ENTITY_VERSION_V4,{queryKey,enabled:diff --git a/frontend/src/container/TracesExplorer/TableView/index.tsx b/frontend/src/container/TracesExplorer/TableView/index.tsxindex 849ea9bd8f..98cb98dd08 100644--- a/frontend/src/container/TracesExplorer/TableView/index.tsx+++ b/frontend/src/container/TracesExplorer/TableView/index.tsx@@ -1,5 +1,5 @@import { Space } from 'antd';-import { DEFAULT_ENTITY_VERSION } from 'constants/app';+import { ENTITY_VERSION_V4 } from 'constants/app';import { initialQueriesMap, PANEL_TYPES } from 'constants/queryBuilder';import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';import { QueryTable } from 'container/QueryTable';@@ -28,7 +28,7 @@ function TableView(): JSX.Element {dataSource: 'traces',},},- DEFAULT_ENTITY_VERSION,+ ENTITY_VERSION_V4,{queryKey: [REACT_QUERY_KEY.GET_QUERY_RANGE,diff --git a/frontend/src/container/TracesExplorer/TracesView/index.tsx b/frontend/src/container/TracesExplorer/TracesView/index.tsxindex 140692e7b5..0eafd11832 100644--- a/frontend/src/container/TracesExplorer/TracesView/index.tsx+++ b/frontend/src/container/TracesExplorer/TracesView/index.tsx@@ -1,7 +1,7 @@import { Typography } from 'antd';import logEvent from 'api/common/logEvent';import { ResizeTable } from 'components/ResizeTable';-import { DEFAULT_ENTITY_VERSION } from 'constants/app';+import { ENTITY_VERSION_V4 } from 'constants/app';import { QueryParams } from 'constants/query';import { initialQueriesMap, PANEL_TYPES } from 'constants/queryBuilder';import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';@@ -52,7 +52,7 @@ function TracesView({ isFilterApplied }: TracesViewProps): JSX.Element {pagination: paginationQueryData,},},- DEFAULT_ENTITY_VERSION,+ ENTITY_VERSION_V4,{queryKey: [REACT_QUERY_KEY.GET_QUERY_RANGE,diff --git a/frontend/src/pages/TracesExplorer/__test__/TracesExplorer.test.tsx b/frontend/src/pages/TracesExplorer/__test__/TracesExplorer.test.tsxindex 2c1f80e07f..91e3bd1c21 100644--- a/frontend/src/pages/TracesExplorer/__test__/TracesExplorer.test.tsx+++ b/frontend/src/pages/TracesExplorer/__test__/TracesExplorer.test.tsx@@ -465,7 +465,7 @@ jest.mock('hooks/useHandleExplorerTabChange', () => ({describe('TracesExplorer - ', () => {it('should render the traces explorer page', async () => {server.use(- rest.post('http://localhost/api/v3/query_range', (req, res, ctx) =>+ rest.post('http://localhost/api/v4/query_range', (req, res, ctx) =>res(ctx.status(200), ctx.json(queryRangeForTimeSeries)),),);@@ -513,7 +513,7 @@ describe('TracesExplorer - ', () => {it('trace explorer - list view', async () => {server.use(- rest.post('http://localhost/api/v3/query_range', (req, res, ctx) =>+ rest.post('http://localhost/api/v4/query_range', (req, res, ctx) =>res(ctx.status(200), ctx.json(queryRangeForListView)),),);@@ -536,7 +536,7 @@ describe('TracesExplorer - ', () => {it('trace explorer - table view', async () => {server.use(- rest.post('http://localhost/api/v3/query_range', (req, res, ctx) =>+ rest.post('http://localhost/api/v4/query_range', (req, res, ctx) =>res(ctx.status(200), ctx.json(queryRangeForTableView)),),);@@ -554,7 +554,7 @@ describe('TracesExplorer - ', () => {it('trace explorer - trace view', async () => {server.use(- rest.post('http://localhost/api/v3/query_range', (req, res, ctx) =>+ rest.post('http://localhost/api/v4/query_range', (req, res, ctx) =>res(ctx.status(200), ctx.json(queryRangeForTraceView)),),);