diff --git a/.changeset/afraid-days-deny.md b/.changeset/afraid-days-deny.md new file mode 100644 index 000000000..0b8120e5b --- /dev/null +++ b/.changeset/afraid-days-deny.md @@ -0,0 +1,5 @@ +--- +'@hyperdx/api': patch +--- + +fix: query to extract metrics names diff --git a/.changeset/funny-singers-give.md b/.changeset/funny-singers-give.md new file mode 100644 index 000000000..b45dc24a0 --- /dev/null +++ b/.changeset/funny-singers-give.md @@ -0,0 +1,5 @@ +--- +'@hyperdx/app': patch +--- + +style: Summary count UI label diff --git a/packages/api/src/clickhouse/index.ts b/packages/api/src/clickhouse/index.ts index 9a6e40c9e..28bfe1116 100644 --- a/packages/api/src/clickhouse/index.ts +++ b/packages/api/src/clickhouse/index.ts @@ -676,7 +676,11 @@ export const getMetricsNames = async ({ data_type, if( data_type = ?, - format('{} - {}', splitByChar('_', name)[1], data_type), + format( + '{} - {}', + replaceRegexpOne(name, '_[^_]+$', ''), + data_type + ), format('{} - {}', name, data_type) ) AS name FROM ?? @@ -750,7 +754,11 @@ export const getMetricsTags = async ({ data_type, if( data_type = ?, - format('{} - {}', splitByChar('_', name)[1], data_type), + format( + '{} - {}', + replaceRegexpOne(name, '_[^_]+$', ''), + data_type + ), format('{} - {}', name, data_type) ) AS combined_name FROM ?? diff --git a/packages/app/src/ChartUtils.tsx b/packages/app/src/ChartUtils.tsx index a4b18a2a2..8205acc72 100644 --- a/packages/app/src/ChartUtils.tsx +++ b/packages/app/src/ChartUtils.tsx @@ -59,7 +59,7 @@ export const getMetricAggFns = ( { value: 'sum', label: 'Sum' }, { value: 'max', label: 'Maximum' }, { value: 'min', label: 'Minimum' }, - { value: 'count', label: 'Count' }, + { value: 'count', label: 'Sample Count' }, ]; }