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.

fix: remove the checks for aggregate operator in case of metrics v3/v4 (#5775)

Vikrant Gupta4b861b21692c
diff --git a/frontend/src/container/QueryBuilder/filters/AggregatorFilter/AggregatorFilter.tsx b/frontend/src/container/QueryBuilder/filters/AggregatorFilter/AggregatorFilter.tsx
index 492329f69b..36c54aa9a1 100644
--- a/frontend/src/container/QueryBuilder/filters/AggregatorFilter/AggregatorFilter.tsx
+++ b/frontend/src/container/QueryBuilder/filters/AggregatorFilter/AggregatorFilter.tsx
@@ -62,7 +62,9 @@ export const AggregatorFilter = memo(function AggregatorFilter({
dataSource: query.dataSource,
}),
{
- enabled: !!query.aggregateOperator && !!query.dataSource,
+ enabled:
+ query.dataSource === DataSource.METRICS ||
+ (!!query.aggregateOperator && !!query.dataSource),
onSuccess: (data) => {
const options: ExtendedSelectOption[] =
data?.payload?.attributeKeys?.map(({ id: _, ...item }) => ({
diff --git a/frontend/src/hooks/queryBuilder/useFetchKeysAndValues.ts b/frontend/src/hooks/queryBuilder/useFetchKeysAndValues.ts
index 5fe5e100fa..6fd42175ad 100644
--- a/frontend/src/hooks/queryBuilder/useFetchKeysAndValues.ts
+++ b/frontend/src/hooks/queryBuilder/useFetchKeysAndValues.ts
@@ -92,15 +92,9 @@ export const useFetchKeysAndValues = (
const isQueryEnabled = useMemo(
() =>
query.dataSource === DataSource.METRICS
- ? !!query.aggregateOperator &&
- !!query.dataSource &&
- !!query.aggregateAttribute.dataType
+ ? !!query.dataSource && !!query.aggregateAttribute.dataType
: true,
- [
- query.aggregateAttribute.dataType,
- query.aggregateOperator,
- query.dataSource,
- ],
+ [query.aggregateAttribute.dataType, query.dataSource],
);
const { data, isFetching, status } = useGetAggregateKeys(