Skip to content

Commit 8dee21c

Browse files
Minor Heatmap Improvements (#1317)
Small improvements to heatmap logic: 1. Improve the logic around filtering the outliers. Previously it was hardcoded to Duration, now it will correctly use the `Value` from the user. If the value contains an aggregate function, it will also perform a CTE to properly calculate. 1. If the outliers query fails, we show the user the query error 2. We prioritize the outlier keys in the event deltas view over inliers (this was how it was before, now it only includes inliers if no outliers are found) 3. Ensure the autocomplete suggestions are displayed (there was a zindex issue)
1 parent 19c5085 commit 8dee21c

File tree

8 files changed

+530
-76
lines changed

8 files changed

+530
-76
lines changed

.changeset/many-ravens-travel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/app": patch
3+
---
4+
5+
Improve event deltas (error states, complex values leverage ctes, etc.)

packages/app/src/ChartUtils.tsx

Lines changed: 93 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,18 +387,108 @@ export function timeBucketByGranularity(
387387

388388
export const isAggregateFunction = (value: string) => {
389389
const fns = [
390+
// Basic aggregates
390391
'count',
391392
'countIf',
392393
'countDistinct',
393394
'sum',
395+
'sumIf',
394396
'avg',
395-
'distinct',
397+
'avgIf',
396398
'min',
397399
'max',
398-
'quantile',
399400
'any',
400-
'none',
401+
'anyLast',
402+
'groupArray',
403+
'groupArrayInsertAt',
404+
'groupArrayMovingAvg',
405+
'groupArraySample',
406+
'groupUniqArray',
407+
'groupUniqArrayIf',
408+
'groupArrayIntersect',
409+
'groupArrayIntersectIf',
410+
'groupArrayReduce',
411+
'groupBitmap',
412+
'groupBitmapIf',
413+
'groupBitmapOr',
414+
'groupBitmapXor',
415+
416+
// Quantiles
417+
'quantile',
418+
'quantileIf',
419+
'quantileExact',
420+
'quantileExactWeighted',
421+
'quantileTiming',
422+
'quantileTimingWeighted',
423+
'quantileTDigest',
424+
'quantileTDigestWeighted',
425+
'quantileBFloat16',
426+
'quantileBFloat16Weighted',
427+
'quantiles',
428+
'median',
429+
'medianExact',
430+
'medianTDigest',
431+
'medianBFloat16',
432+
433+
// Statistical functions
434+
'stddevPop',
435+
'stddevPopIf',
436+
'stddevSamp',
437+
'stddevSampIf',
438+
'varPop',
439+
'varPopIf',
440+
'varSamp',
441+
'varSampIf',
442+
'covarPop',
443+
'covarSamp',
444+
'corr',
445+
446+
// Combinators
447+
'uniq',
448+
'uniqExact',
449+
'uniqCombined',
450+
'uniqCombined64',
451+
'uniqHLL12',
452+
'uniqTheta',
453+
454+
// Bit operations
455+
'groupBitAnd',
456+
'groupBitOr',
457+
'groupBitXor',
458+
459+
// Map and tuple
460+
'groupArrayMap',
461+
'groupArrayTuple',
462+
'groupArraySorted',
463+
'topK',
464+
'topKIf',
465+
'topKWeighted',
466+
467+
// Aggregate combinators
468+
'argMin',
469+
'argMax',
470+
'minMap',
471+
'maxMap',
472+
473+
// Specialized aggregates
474+
'runningDifference',
475+
'retention',
476+
'sequenceCount',
477+
'sequenceMatch',
478+
'histogram',
479+
'simpleLinearRegression',
480+
'stochasticLinearRegression',
481+
'categoricalInformationValue',
482+
'sumMap',
483+
'sumMapFiltered',
484+
'sumWithOverflow',
485+
'entropy',
486+
'skewPop',
487+
'skewSamp',
488+
'kurtPop',
489+
'kurtSamp',
401490
];
491+
402492
return fns.some(fn => value.includes(fn + '('));
403493
};
404494

0 commit comments

Comments
 (0)