Skip to content

feat: add apdex support for histograms#1630

Open
sgarfinkel wants to merge 2 commits intohyperdxio:mainfrom
sgarfinkel:apdex
Open

feat: add apdex support for histograms#1630
sgarfinkel wants to merge 2 commits intohyperdxio:mainfrom
sgarfinkel:apdex

Conversation

@sgarfinkel
Copy link
Contributor

Adds apdex support in HyperDX. This currently only works with histograms (and will also work with exponential histograms if those are eventually supported).

Here's the UX:
cf165d75-0931-4bce-befe-612ce758dbe9
fc69754d-d51f-4c90-9b0b-824bfc079d6d

@changeset-bot
Copy link

changeset-bot bot commented Jan 21, 2026

🦋 Changeset detected

Latest commit: e4e5f43

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/common-utils Minor
@hyperdx/app Minor
@hyperdx/api Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jan 21, 2026

@sgarfinkel is attempting to deploy a commit to the HyperDX Team on Vercel.

A member of the Team first needs to authorize it.

{ value: 'any' as const, label: 'Any' },
{ value: 'none' as const, label: 'None' },
{
group: 'Extra',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@teeohhem I mentioned this in discord a while back so wanted to just draw your attention to the UX here. I wasn't sure the best way to display this as a non-aggregation function. This makes it appear as its own group.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three things:

  1. Let's add a top group labeled "Aggregations"
  2. Let's rename this to "Derived Metrics"
  3. Let's update the label for now to Apdex (histogram only)

I'd also prefer it if this is disabled or validates into an error state when a non-histogram is selected. Let me know if you need a hand and I can help with some of this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do! I think I can get at the selected metric type, will have to investigate if that's available via a watch.

@teeohhem teeohhem requested review from dhable and teeohhem January 29, 2026 15:17
Copy link
Contributor

@dhable dhable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of comments on the query generation.

valueAlias: TemplatedInput;
}): WithClauses => [
{
name: 'source',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much of this logic is the same as the source CTE chunk for the aggregate based histogram charts. Maybe we should make this a reusable chunk that we can use in both cases.

The benefit there is that we would have test coverage from two different angles instead of having two chunks that could drift going forward.

${timeBucketSelect},
${groupBy ? chSql`[${groupBy}] AS group,` : ''}
sumForEach(deltas) AS bucket_counts,
${{ Float64: threshold }} AS threshold
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a constant value and including in the CTE means it's going to be materialized on every record in the source CTE when it doesn't need to. Could we move this either in-line or at least on the metrics CTE to skip materializing this on the sub-query?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants