Commit graph

887 commits

Author SHA1 Message Date
github-actions[bot]
fb1b035630
Release HyperDX (#1197)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-29 16:05:02 -07:00
Drew Davis
77d0e56f5c
chore: Add spans for alert processing (#1219)
Closes HDX-2506

# Summary

This PR adds a span for each task (of any kind) and each alert processing loop (one per connection), with provider, team, and connection span attributes. When ported to Cloud, this will allow us to more easily determine which team logs are coming from.

<img width="1492" height="105" alt="Screenshot 2025-09-29 at 1 04 20 PM" src="https://github.com/user-attachments/assets/2eed25fc-32b3-48b2-b7f0-24ffe0beab18" />
<img width="1449" height="148" alt="Screenshot 2025-09-29 at 1 04 17 PM" src="https://github.com/user-attachments/assets/1b8d6acc-df90-4048-96db-2b2dc2bc2d63" />
<img width="515" height="213" alt="Screenshot 2025-09-29 at 1 04 12 PM" src="https://github.com/user-attachments/assets/061f366f-24ac-4195-9b72-3f1b5a871e36" />
2025-09-29 20:20:36 +00:00
Dan Hable
1ed4fbf864
fix: simplify alert provider load logic (#1220)
Dynamic module resolution causes issues in builds that use tools like esbuild; resulting paths are often not the same as they would in the source tree. Instead we can simplify the loading logic to use a defined object map of names to constructor functions. The mapping object should be small enough that merge conflicts with forks should be easy to resolve.
2025-09-29 19:30:02 +00:00
Dan Hable
270c6b4f96
chore: additional logging around task execution (#1217) 2025-09-29 15:59:58 +00:00
Tom Alexander
7837a621d8
fix: Multiline support for WHERE Input boxes (#1208)
Co-authored-by: Brandon Pereira <brandon-pereira@users.noreply.github.com>
2025-09-29 09:55:14 -06:00
Aaron Knudtson
a8418f691b
fix: broken query due to semicolon in subquery (#1216)
Fixes HDX-2515
2025-09-29 15:18:34 +00:00
Mike Shi
54d30b92f5
feat: Add support for filter by parsed JSON string (#1213)
Resolves HDX-1983

<img width="646" height="242" alt="image" src="https://github.com/user-attachments/assets/376c0e02-73b9-49e3-96f8-ebb3475a7e82" />
2025-09-27 16:14:03 +00:00
Drew Davis
6c8efbcb56
feat: Add Dashboard filters (#1207)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-09-26 14:08:57 -04:00
Drew Davis
e053c490d8
feat: Add user-agent to alerts client (#1209)
Closes HDX-2481

# Summary

For browser-based queries, the clickhouse requests go through the clickhouse-proxy endpoint, which re-writes the user-agent header for analytics purposes.

Alerts queries don't go through the clickhouse-proxy, and clickhouse-js doesn't allow us to directly set the user-agent header. We can instead provide an `application` name, which is pre-pended to the default clickhouse-js user-agent, yielding a user-agent like:
```
hyperdx-alerts 2.5.0 clickhouse-js/1.12.1 (lv:nodejs/v22.19.0; os:darwin)
```

The user agent shows up in ClickHouse query logs:
<img width="607" height="279" alt="Screenshot 2025-09-25 at 1 27 36 PM" src="https://github.com/user-attachments/assets/8098648d-9245-42c5-a41c-d7a58186ad68" />
2025-09-25 17:52:13 +00:00
Elizabet Oliveira
8a24c32ad7
Feat: add highlight animation for recently moved filter checkboxes (#1180)
This PR adds a highlight animation for recently moved filter checkboxes.

### Why?

When filters are moved, users can easily lose track of checkboxees, especially when labels have similar texts. This PR highlights recently moved checkboxes to make changes immediately visible.


| Before | After |
|--------|-------|
| <video src="https://github.com/user-attachments/assets/689556e6-8a10-4c3e-b188-043ebcfa0cea" autoplay loop muted width="200"></video> | <video src="https://github.com/user-attachments/assets/c7edb5a3-5dd0-43d1-8672-a4d399269893" autoplay loop muted width="200"></video> |
2025-09-25 14:39:20 +00:00
Warren
4ff55c0e44
perf: disable CTE if disableRowLimit flag is true (getKeyValues method) (#1205)
To pull things like metric tags, `getKeyValues` method should fallback to the query w/o using CTE for better performance

Ref: HDX-2482
2025-09-25 13:30:21 +00:00
Brandon Pereira
24314a9605
add dashboard import/export functionality (#1204)
Adds Dashboard Import/Export UI to support sharing premade dashboards

<img width="286" height="171" alt="Screenshot 2025-09-24 at 10 10 55 AM" src="https://github.com/user-attachments/assets/dbc61cad-a7e6-42c6-85b8-de049beb7d56" />
<img width="1037" height="625" alt="Screenshot 2025-09-24 at 10 10 48 AM" src="https://github.com/user-attachments/assets/4233bdd8-fb73-4c8a-953f-5a59f5e53108" />

Fixes HDX-2463
2025-09-25 13:26:32 +00:00
Aaron Knudtson
816f90a392
fix: disable json metadata field and key fetching (#1200)
Currently not working well at all. Just disabling for the time being
2025-09-25 06:01:03 +00:00
Warren
8f06ce7b33
perf: add prelimit CTE to getMapKeys query + store clickhouse settings in shared cache (#1201)
Optimize the query performance of the getMapKeys method to prevent excessive resource usage in ClickHouse, even when max_rows_to_read is specified.

Ref: HDX-2411
Ref: HDX-2431
2025-09-24 00:42:26 +00:00
Aaron Knudtson
8673f967c5
Revert "Revert "fix: json getKeyValues (useful for autocomplete) (#1186)"" (#1199)
Reverts hyperdxio/hyperdx#1190
2025-09-23 19:02:18 +00:00
Brandon Pereira
fa25a0c9fe
Improve search error isolation (#1175)
Co-authored-by: Tom Alexander <teeohhem@gmail.com>
Co-authored-by: Aaron Knudtson <87577305+knudtty@users.noreply.github.com>
2025-09-23 13:37:01 -04:00
Warren
69a2a6af43
fix: 'Around a time' duration update in TimePicker (#1196)
The ‘Around a time’ mode should use the midpoint instead of the date range, so the range gets reset every time.

Ref: HDX-2459
2025-09-23 16:23:27 +00:00
Drew Davis
2ed16e90c7
test: Add E2E test for the infrastructure search side panel (#1198) 2025-09-23 10:50:58 -04:00
Brandon Pereira
ea5d2921ec
perf: optimize memory usage in denoised-rows query by conditionally including processedRows (#1177)
When the searching row limits is set very high (ex the max of 100k) the app quickly consumes all available memory and crashes.

This adds some improvements to help mitigate the problem: 

1. **QueryKey Issues** - The `queryKey` is generating a ton of extra entries every time the `processedRows` changes (which is every 5s when in live mode). The queryKey and result is cached regardless of if enabled is true or false. The base hashFn strategy is to [stringify the objects](2a00fb6504/packages/query-core/src/utils.ts (L216-L217)) which creates a very large string to be stored in memory. I tried to fix this by providing a custom `queryKeyHashFn` to `useQuery` but it was too slow, and the faster browser based hashing fns return a promise which isn't supported by `useQuery` at this time. The easiest solution I found was to short circuit the hash generation if we are not denoising.
2. **Sync `gcTime`** - We already set `gcTime` in `useOffsetPaginatedQuery` so I added that field here too, this helps keep the memory usage lower while denoising rows (but the memory still is much higher).

**The app still uses very high memory usage, just from the sheer number of rows being captured and processed**, but it doesn't crash anymore. There is definitely further optimizations we could make to reduce this. One solution that comes to mind is storing a hash/unique id of each row server side before sending to the client, then our app can leverage this key instead of a stringified object.

Before (after 1 min):
<img width="645" height="220" alt="Screenshot 2025-09-17 at 4 05 59 PM" src="https://github.com/user-attachments/assets/dab0ba34-4e92-42ce-90a0-fefadd9f0556" />

After (after 5 mins):
<img width="1887" height="940" alt="Screenshot 2025-09-17 at 3 52 23 PM" src="https://github.com/user-attachments/assets/bd969d2a-f0ec-4a5a-9858-409ff4a1eaa1" />

Fixes: HDX-2409
2025-09-23 14:08:41 +00:00
Drew Davis
8a1762e03f
test: Add E2E tests for k8s dashboard (#1192)
Closes HDX-2449

This PR adds e2e tests for the preset k8s dashboard.
2025-09-22 16:16:21 +00:00
github-actions[bot]
a9715350ee
Release HyperDX (#1170)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-20 21:03:57 -07:00
Tom Alexander
68f46e0a72
Revert "fix: json getKeyValues (useful for autocomplete) (#1186)" (#1190)
This reverts commit d60d92030d.

Commit breaks dashboards with: 
<img width="1179" height="779" alt="image" src="https://github.com/user-attachments/assets/bcb05f7a-6787-4a39-859f-92e6f6ffbe9e" />
2025-09-20 02:17:50 +00:00
Tom Alexander
83b9c8a4b7
chore: Add playwright tests for app in local-only mode (#1181)
Fixes: HDX-2442
2025-09-20 01:43:08 +00:00
Mike Shi
5a44953e49
feat: Add new none aggregation function to allow fully user defined aggregations in SQL (#1174)
<img width="1956" height="851" alt="image" src="https://github.com/user-attachments/assets/3ca89db9-484b-4e74-88a5-4c31b6a96aef" />
2025-09-19 21:17:40 +00:00
Drew Davis
2c44ef98a8
style: Update icon used to show source schema (#1189)
This PR updates the icon used to show a sources SQL schema, based on team feedback. The new icon matches the icon used to show search SQL.

## Before

<img width="240" height="49" alt="Screenshot 2025-09-19 at 2 51 19 PM" src="https://github.com/user-attachments/assets/e46f0dae-73b2-4b52-b5d7-86142cffab41" />
<img width="366" height="61" alt="Screenshot 2025-09-19 at 2 51 14 PM" src="https://github.com/user-attachments/assets/017b9678-88d1-4eef-bc1b-c8bc5974c7ae" />


## After

<img width="1085" height="469" alt="Screenshot 2025-09-19 at 2 49 14 PM" src="https://github.com/user-attachments/assets/d76a36f1-a527-4879-95b9-031efba8f50a" />
<img width="246" height="51" alt="Screenshot 2025-09-19 at 2 49 02 PM" src="https://github.com/user-attachments/assets/69599f99-b508-42e4-995d-8a895ca8a385" />
<img width="377" height="56" alt="Screenshot 2025-09-19 at 2 48 56 PM" src="https://github.com/user-attachments/assets/48e799cf-f99a-46ba-bcc8-6e9b7b5cdd22" />
2025-09-19 19:03:13 +00:00
Aaron Knudtson
d60d92030d
fix: json getKeyValues (useful for autocomplete) (#1186)
Ref HDX-2034
2025-09-19 16:49:12 +00:00
Drew Davis
0183483a9a
feat: Add source schema previews (#1182)
Closes HDX-2404

This PR adds a new info icon next to various Source pickers, which when clicked opens a modal that shows the schema(s) for the table(s) associated with the source.

<details>
<summary>On the search page</summary>
<img width="483" height="263" alt="Screenshot 2025-09-18 at 1 57 14 PM" src="https://github.com/user-attachments/assets/84437e6d-f9da-4885-af87-b72767681b61" />
<img width="1367" height="923" alt="Screenshot 2025-09-18 at 4 15 12 PM" src="https://github.com/user-attachments/assets/1fe259f7-2cbf-480b-b3c3-5e94a298dd07" />
</details>

<details>
<summary>In the source form</summary>
<img width="1122" height="657" alt="Screenshot 2025-09-18 at 1 57 57 PM" src="https://github.com/user-attachments/assets/0ffa3bfb-46df-45e6-8a64-188f52d7d1cb" />
<img width="1244" height="520" alt="Screenshot 2025-09-18 at 1 58 11 PM" src="https://github.com/user-attachments/assets/0c4fb035-afb0-4eda-8bdc-3d8b3ccd34c9" />
</details>

<details>
<summary>In the chart explorer</summary>
<img width="559" height="221" alt="Screenshot 2025-09-18 at 1 57 33 PM" src="https://github.com/user-attachments/assets/8ea84e73-eb5d-445a-9faa-0180b5b9b8f9" />
</details>

<details>
<summary>Multiple schemas are shown when a metric source is chosen</summary>
<img width="890" height="1044" alt="Screenshot 2025-09-18 at 4 14 37 PM" src="https://github.com/user-attachments/assets/f2463435-e9f5-4253-a3cb-2c76a74ea18e" />
</details>
2025-09-19 15:02:15 +00:00
Mike Shi
0d9f3fe04e
fix: Always enable query analyzer to fix compatibility issues with old ClickHouse versions. (#1185) 2025-09-18 21:53:01 -07:00
Drew Davis
140e4d2f23
feat: Get ClickHouse client from AlertProvider (#1183)
HDX-2078

This PR shifts the creation of the ClickHouse client used by alerts to the AlertProvider interface, to support other auth methods in other AlertProvider implementations.

Running locally, the default provider creates the client and successfully queries with it:
<img width="1716" height="206" alt="Screenshot 2025-09-18 at 3 58 31 PM" src="https://github.com/user-attachments/assets/971a633f-6ddd-42ca-be70-19e303573938" />
2025-09-18 20:34:22 +00:00
Aaron Knudtson
21f1aa7567
fix: filter values for json casted to string (#1184)
Fixes HDX-2425

Was able to make improvements to the filters appearance, but cast to string for the actual query. Fixes the query and improves the UI!
<img width="420" height="204" alt="image" src="https://github.com/user-attachments/assets/0c30cc9a-ccea-499e-8c5f-51c8c38871e5" />
2025-09-18 20:20:06 +00:00
Drew Davis
825452fe86
refactor: Decouple alerts processing from Mongo (#1176)
Closes HDX-2281

This PR adds two additional functions to the `AlertProvider` interface, and implements them for the default provider. The intention behind these changes is to eliminate all direct Mongo access from the alert check loop, and instead handle the connection to Mongo through the `AlertProvider` interface.

The new functions are as follows:
1. `getWebhooks(teamId): Map<string, IWebhook>`: This function is used to retrieve the webhooks that may be used to send alerts. While it would be nice to just attach the webhook information to the AlertDetails, we have (unfinished?) support for referencing arbitrary wehbooks within message templates, and this pattern better supports that future use-case without having to process message templates while loading alerts.
3. `updateAlertState(AlertHistory)`: This function is used to update the state of an Alert document and save the given AlertHistory document.

The AlertDetails and AlertTask interfaces have also been updated to reduce the number of parameters passed to some functions while still shifting Mongo accesses to the AlertProvider:
1. AlertDetails now includes the `previous` AlertHistory value
2. AlertTask now includes the value of `now`
2025-09-18 19:20:27 +00:00
Mike Shi
0cf8556d47
feat: Allow chart series to be reodered (#1173)
Resolves HDX-2143

<img width="1965" height="625" alt="image" src="https://github.com/user-attachments/assets/83c77653-78d5-445c-b0a4-c3c96f1d2dbd" />
2025-09-17 20:03:46 +00:00
Brandon Pereira
7a0580590d
Reusable DBSqlRowTableWithSideBar Component (#1171)
Across the app, we are inconsistent with when we can open the sidebar and expand functionality. This is because the sidebar and logic was managed by the parent component.

Additionally, the expand logic was set to assume a certain structure that some places in the application could not support (ex clickhouse dashboard doesn't have a 'source'). 

As a result, I have created the `DBSqlRowTableWithSideBar` component which will manage a lot of the common use cases for us. This PR introduces that new component, and updates all references (that could be easily upgraded) to use the new component when applciable.

The result: a lot less duplicate code (see # of lines removed) and the ability to more easily maintain the components down the road.

This PR also fixes several bugs I found as I tested these flows, especially around sidebars opening subpanels.

Fixes: HDX-2341
2025-09-17 19:58:45 +00:00
Elizabet Oliveira
970c0027b8
Improve Discoverability Inline Expansion of Items in Search Table (#1168) 2025-09-17 18:09:43 +01:00
Brandon Pereira
3d82583fce
fix: api linting could fail locally (#1164)
it could fail locally depending on if the .d.ts files in common-utils were generated, since common-utils uses aliases and tsup can't generate these aliases, we turn off skipLibCheck ([which is recommended](https://www.typescriptlang.org/tsconfig/#skipLibCheck)) and those files are not type checked, those ignoring the alias issue but still type checking the code)

**Note**: This setting is already enabled in `app`, so we are just syncing it to `api` and `common-utils` 

original ticket: https://github.com/hyperdxio/hyperdx/pull/1159
2025-09-17 14:53:24 +00:00
Drew Davis
1d79980e31
fix: Fix ascending order in windowed searches (#1172)
Closes HDX-2407

This PR fixes searches which sort in ascending time order or do not order based on time. With this change, time-based "chunking" of queries (#1125) will only be used when the results are ordered by time. Further, when ordering by time _ascending_, the chunks will load in ascending time order (rather than descending time order).
2025-09-17 12:05:18 +00:00
Warren
df259392a3
chore: remove unused npm packages (api) (#1169) 2025-09-15 18:38:59 +00:00
Tom Alexander
8e813dbd80
chore: add data-test-ids to components (#1167)
Addresses: HDX-2354
2025-09-15 13:49:18 +00:00
github-actions[bot]
6d1a123322
Release HyperDX (#1149)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-12 13:43:16 -07:00
Drew Davis
e7b590cc59
fix: Fix invalid valueExpression (#1161) 2025-09-12 11:43:37 -04:00
Mike Shi
cd5cc7d2c5
fix: Fixed trace table source inference to correctly infer span events column (#1163)
Fixes HDX-2388
2025-09-12 14:04:03 +00:00
Drew Davis
fa45875d38
feat: Add delta() function for gauge metrics (#1147) 2025-09-11 17:10:43 -04:00
Drew Davis
5d567b9975
test: Add integration test for user removal alert updates (#1160) 2025-09-11 15:31:59 -04:00
Brandon Pereira
92224d65c5
Improve common-utils intellisense. Currently "Go to Definition" on an… (#1159) 2025-09-11 12:57:41 -06:00
Drew Davis
d938b4a476
feat: Improve Slack Webhook validation (#1153) 2025-09-11 11:41:11 -04:00
Drew Davis
fd732a083d
perf: Query AlertHistory in bulk (#1157) 2025-09-11 11:07:17 -04:00
Tom Alexander
bec64bfa7b
feat: Add starter claude.md file for agents (#1158) 2025-09-11 10:43:33 -04:00
Drew Davis
45e8e1b62d
fix: Update tsconfigs to resolve IDE type errors (#1150) 2025-09-11 08:55:14 -04:00
Brandon Pereira
5c88c46375
fix bug where reading value when server is offline could throw client error (#1154) 2025-09-10 15:07:57 -06:00
Brandon Pereira
c48f418114
Improvements to the Search Filters (#1143) 2025-09-10 09:20:25 -06:00