Commit graph

1212 commits

Author SHA1 Message Date
github-actions[bot]
00703bc121
Release HyperDX (#1696)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-04 12:30:19 -08:00
Warren Lee
3dae0e012f
fix: copy otel-collector schema directory to AIO image (#1700) 2026-02-04 12:27:23 -08:00
Drew Davis
6cfa40a0f7
feat: Add support for querying nested/array fields (#1660)
Closes HDX-3113

# Summary

This PR adds support for querying nested (array-type) columns with Lucene syntax.

## Syntax

### Arrays of simple types

- Array is non-empty: `Events.Name:*` --> `notEmpty(Events.Name)`
- Array contains element: `Events.Name:"error"` --> `has(Events.Name, 'error')`
   - Supports string, numeric, and boolean inner types with `has()`
   - All other types are cast to string: `Events.Timestamp:"2026-02-02 15:19:37.196300098"` --> `arrayExists(el ->toString(el) = '2026-02-02 15:19:37.196300098, Events.Timestamp)`
- Array contains element containing: `Events.Name:domain` --> `arrayExists(el -> el ILIKE '%domain%', Events.Name)`

### Arrays of Maps

- Array of maps contains map with non-empty key: `Events.Attributes.exception.stacktrace:*` --> `arrayExists(el - > notEmpty (toString (el['exception.stacktrace'])) = 1, Events.Attributes)`
- Array of maps contains map with key+value: `Events.Attributes.exception.stacktrace:"AggregateError"` --> `arrayExists(el - > el['exception.stacktrace'] = 'AggregateError', Events.Attributes)`
- Array of maps contains map with key containing value: `Events.Attributes.exception.stacktrace:"AggregateError"` --> `arrayExists(el - > el['exception.stacktrace'] ILIKE '%AggregateError%', Events.Attributes)`

### Arrays of JSON

- Array of JSON contains object with non-empty key: `Events.Attributes.message:*` --> `arrayExists(el - > notEmpty (toString (el.message)) = 1, Events.Attributes)`
- Array of JSON contains object with key + value: `Events.Attributes.exception.stacktrace:"AggregateError"` --> `arrayExists(el - > toString (el.exception.stacktrace) = 'AggregateError', Events.Attributes)`
- Array of JSON contains object with key containing value: `Events.Attributes.exception.stacktrace:AggregateError` --> `arrayExists(el - > toString (el.exception.stacktrace) ILIKE '%AggregateError%', Events.Attributes)`
2026-02-04 17:34:48 +00:00
Hannes Leutloff
8f1026089d
fix: Set correct github URL as image source in Dockerfiles (#1698)
I went ahead and looked for more occurences of the issue i raised #1697 and fixed them. I hope that's alright with you.
2026-02-04 16:11:31 +00:00
Elizabet Oliveira
3c38272f95
Enhance Sessions page UI with improved setup instructions and consistent font application (#1695) 2026-02-04 14:36:42 +00:00
Drew Davis
3859ceb2d2
test: Add E2E tests for external dashboard APIs (#1691)
Closes HDX-3311

# Summary

This PR adds E2E tests that verify that dashboards created and edited through the external API can be rendered correctly in the UI.

- The tests create a dashboard with all tile types through the external API, then assert that the tile edit form contains the correct values for all of the tile's properties.
- The tests verify that the dashboard can be saved from the UI, proving that the dashboard data conforms to the _internal_ dashboard API's schema, after being created by the external dashboards API
- The tests also validate that dashboard updates and deletes via the external API are reflected in the UI.
2026-02-04 12:36:55 +00:00
github-actions[bot]
a8457e2be9
Release HyperDX (#1688)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-04 05:21:21 +01:00
Drew Davis
9f75fe2e8f
fix: Ensure Noisy Patterns message isn't clipped (#1693)
Closes HDX-3333

# Before

The "Removed Noisy Event Patterns" message was either missing or partially clipped, depending on the theme

<img width="1484" height="404" alt="Screenshot 2026-02-03 at 6 13 01 PM" src="https://github.com/user-attachments/assets/d2533a4b-4fe5-4339-8a2b-bdb7d027fcbe" />
<img width="1477" height="498" alt="Screenshot 2026-02-03 at 6 12 37 PM" src="https://github.com/user-attachments/assets/4cb5d675-4440-440a-a398-f49911a66120" />

# After

<img width="1476" height="507" alt="Screenshot 2026-02-03 at 6 09 09 PM" src="https://github.com/user-attachments/assets/490aa195-c9bd-4567-80d5-07753bd132dd" />
<img width="1482" height="563" alt="Screenshot 2026-02-03 at 6 09 52 PM" src="https://github.com/user-attachments/assets/28efb171-b65e-44d1-8ed5-1eb326ea3833" />
<img width="1728" height="499" alt="Screenshot 2026-02-03 at 6 09 41 PM" src="https://github.com/user-attachments/assets/e6302e2c-f01c-4c68-a57f-4c09ac4b2317" />
<img width="1727" height="491" alt="Screenshot 2026-02-03 at 6 09 30 PM" src="https://github.com/user-attachments/assets/deac6de2-0b27-4cbb-aa47-393bb765494d" />
2026-02-04 00:44:12 +00:00
Drew Davis
d89a2db283
fix: Fix side panel tab colors in ClickStack theme (#1694)
# Before

The ClickStack theme had green underlines on the sidebar tabs, despite other tabs having yellow underlines.

<img width="759" height="73" alt="Screenshot 2026-02-03 at 6 19 06 PM" src="https://github.com/user-attachments/assets/753081b4-6e8a-49a2-b301-6535c7c5ee89" />


# After

The ClickStack theme has yellow underlines, the HyperDX theme has green.

<img width="542" height="95" alt="Screenshot 2026-02-03 at 6 24 17 PM" src="https://github.com/user-attachments/assets/52225926-cc1b-4fb4-8231-a24ed75a6395" />
<img width="579" height="76" alt="Screenshot 2026-02-03 at 6 27 02 PM" src="https://github.com/user-attachments/assets/06ae5635-b026-4e88-971b-07253e284e3b" />
2026-02-04 00:40:05 +00:00
Mike Shi
f44923ba58
Auto Source Creation (#1692) 2026-02-03 15:03:22 -08:00
Drew Davis
288213013c
test: Add missing mocks to prevent test error logs (#1690)
# Summary

This PR adds a couple of missing functions to a metadata mock, which eliminates some unwanted error logs while running the tests
2026-02-03 16:10:47 +00:00
Elizabet Oliveira
7448508d4e
Theme-Aware UI Improvements for ClickStack (#1685) 2026-02-03 11:44:58 +00:00
Warren Lee
683ec1a80e
fix: add TLS parameters for https ClickHouse endpoints in goose DB string (#1689)
Need to add `secure=true&skip_verify=false` TLS params for https (CHC)

Ref: https://github.com/pressly/goose/pull/796/changes
2026-02-02 23:13:56 +00:00
Tom Alexander
ea56d11f8b
fix: Change None aggregation to Custom (#1633)
Justification: "None" is confusing to customers. Custom reflects the ability for users to use their own aggregation in the where clause.
2026-02-02 17:41:42 +00:00
Warren Lee
c2a6193393
feat: add OTLP auth token support for standalone mode (#1684)
Ref: HDX-3317
2026-02-02 17:25:38 +00:00
Warren Lee
6f4c8efba0
feat: Enforce ClickStack schemas by default (#1682)
- Introduce a new flag `HYPERDX_OTEL_EXPORTER_CREATE_LEGACY_SCHEMA` (default to false) to otel collector
- Custom ClickStack schemas should be enforced by default
- ClickHouse tables migration logs should be stored in `clickstack_db_version_xxx` tables
- The collector will run the migration at startup and retry if it fails to connect to the database (using exponential backoff).
- Fully backward compatible

Ref: HDX-3301
2026-02-02 16:39:20 +00:00
Himanshu Kapoor
5da3f3a21e
chore: improve external OpenAPI specs (#1687)
Fixes HDX-3325

* Use enums where possible
* Add descriptions where missing
* Simplify Alert request and types
* Fix a disceprency with alert request and response fields: `team` vs `teamId`, `dashboard` vs `dashboardId`, `savedSearch` vs `savedSearchId`
2026-02-02 16:10:47 +00:00
github-actions[bot]
d78df68e87
Release HyperDX (#1656)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-02 07:43:34 -08:00
Drew Davis
4c287b163c
fix: Fix External Dashboard APIs (#1681)
Closes HDX-3303

# Summary

This PR reworks the external dashboard APIs in the following ways

1. Previously, there was no way to create a renderable dashboard using the create or update routes, because the APIs saved dashboard data in a format incompatible with v2 of HyperDX. This PR introduces a transformation layer to transform external API request and response formats into the v2 dashboard format prior to saving.
2. This PR also corrects and improves the openapi documentation associated with the dashboard endpoints.

This PR introduces a number of **breaking changes** in the dashboard API, which is acceptable because the APIs are already (a) effectively non-functional for writing dashboard data and (b) not aligned at all with the previously published spec when reading dashboard data.

1. The `dataSource` field has been removed from each series and replaced with a `sourceId` field, which specifies the sourceId of the source which should be queried. The `dataSource` argument was inflexible and could only specify `events`, `rrweb`, or `metrics` - these are leftover from V1, and are not very compatible with the design of HyperDX V2.
2. Dashboard responses previously would have contained `config` fields, in the format of a V2 dashboard config. Results are now transformed and align with the spec, which contains config data in a `series` array.
3. Additional validation has been added to prevent creation of some invalid dashboards
2026-01-30 18:15:55 +00:00
Himanshu Kapoor
4e7d04c7b0
fix(errors): Show a better error when the sent JSON body as a syntax error (#1683)
Fixes HDX-3319
2026-01-30 16:55:52 +00:00
Elizabet Oliveira
2f1a13cc81
feat: Add multi-theme system (#1618)
## Multi-Theme System

Adds infrastructure for supporting multiple brand themes (HyperDX & ClickStack) with the ability to switch between them in development mode.

### Preview

https://hyperdx-v2-oss-app-git-add-themes-hyperdx.vercel.app/

### How theme resolution works

Theme switching is **only available in dev/local mode** (`NODE_ENV=development` or `NEXT_PUBLIC_IS_LOCAL_MODE=true`).

**Resolution priority (highest to lowest):**

1. **localStorage** → `hdx-dev-theme` key _(set via explicit UI action)_
2. **Environment variable** → `NEXT_PUBLIC_THEME`
3. **Default** → `hyperdx`

**In production**, the theme is determined solely by `NEXT_PUBLIC_THEME` (defaults to `hyperdx`).

### Changes

#### Theme System
- Added `ThemeProvider` with context for theme-aware components
- Added theme configurations for HyperDX and ClickStack (logos, colors, favicons)
- Dynamic favicon switching based on active theme

#### Component Renaming
- `Icon` → `Logomark` (the icon/symbol only)
- `Logo` → `Wordmark` (icon + text branding)
- Each theme provides its own `Logomark` and `Wordmark` components

#### User Preferences (`useUserPreferences`)
> **Note:** The hook was **modified**, not deleted. It's still actively used across the codebase.

- Renamed `theme` property to `colorMode` to clarify it controls light/dark mode (not brand theme)
- Removed background overlay feature:
  - Deleted `backgroundEnabled`, `backgroundUrl`, `backgroundBlur`, `backgroundOpacity`, `backgroundBlendMode` properties
  - Deleted `useBackground` hook
  - Removed background overlay UI from `UserPreferencesModal`
  - Removed `.hdx-background-image` CSS rules

#### Security
- Added hex color validation for `theme-color` meta tag to prevent XSS
- Hydration-safe `DynamicFavicon` component

#### Type Safety & Documentation
- Added comprehensive documentation in `types.ts` explaining the distinction between:
  - **Color Mode** (light/dark) — user-selectable, stored in `useUserPreferences`
  - **Brand Theme** (hyperdx/clickstack) — deployment-configured, NOT user-selectable in production
- Clear type definitions for `ThemeName`, `ThemeConfig`, and `FaviconConfig`

#### Tests Added
- `theme/__tests__/index.test.ts` — Theme registry, `getTheme()`, localStorage helpers
- `theme/__tests__/ThemeProvider.test.tsx` — Context, hooks, hydration safety
- `components/__tests__/DynamicFavicon.test.tsx` — XSS sanitization, hex color validation

---

*This PR is a work in progress. Feedback welcome!*
2026-01-30 11:27:55 +00:00
Rahul
0d321ea15f
update Docker images for Docker Scout Score improvements (#1680)
Co-authored-by: Himanshu Kapoor <himanshu.kapoor@clickhouse.com>
2026-01-29 16:37:22 -06:00
Himanshu Kapoor
22f882d612
fix: Do not trigger table search input on modals/drawers (#1675)
You can use Cmd+F to search through the log search table. We've implemented a custom input that overrides the native input that allows you to search through virtual items. However, if you click on one of the rows, a drawer opens, and we don't want that search input to listen for keyboard events anymore at this point. This PR fixes this behaviour.

https://github.com/user-attachments/assets/cbcaea4d-77a8-4c37-a368-bffc44ba4d59



Fixes HDX-3302
2026-01-29 18:19:27 +00:00
Warren Lee
43de467864
feat: allow otel-collector to run without OpAMP server (#1672)
Today, users have to set up an OpAMP server to run with our clickstack OTel collector. Instead, we should allow users to disable OpAMP when they're using ClickHouse Cloud with the clickstack integration.

This can be determined by `OPAMP_SERVER_URL` not being defined by the user.

The end result is that a user can do

```
docker run \
  -e CLICKHOUSE_ENDPOINT=${CLICKHOUSE_ENDPOINT} \
  -e CLICKHOUSE_USER=default \
  -e CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD} \
  -p 8080:8080 -p 4317:4317 -p 4318:4318 \
  clickhouse/clickstack-otel-collector:latest
```

Ref: HDX-3300
2026-01-29 17:50:24 +00:00
dependabot[bot]
7ce9485e83
build(deps): bump next from 16.0.10 to 16.1.5 (#1667)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-29 09:27:33 -08:00
Brandon Pereira
f7d8b83f95
Improve sidebar expand/collapse animation (#1651)
Small Friday Afternoon PR to improve the animation of the nav

Before:

https://github.com/user-attachments/assets/665de5a5-59c1-4b82-8ae2-bb383f70b418



After:

https://github.com/user-attachments/assets/ac43270d-06c4-4a4d-979e-a8acd6f0b5eb
2026-01-29 16:29:39 +00:00
Drew Davis
941bc23ef4
fix: Fix inaccurate openapi docs for external alerts API (#1676)
# Summary

This PR updates the external Alerts API specs so that the specs match the actual behavior of the API.

I've also added a validator to an API which was missing any validation.
2026-01-29 16:20:50 +00:00
Karl Power
b8ab312a4c
chore: improve Team typing (#1669)
Some changes to improve the Team typing specifically at the `app<->api` boundary to support work for HDX-3156.
2026-01-29 15:39:49 +00:00
Himanshu Kapoor
3aa8be0ae7
feat(externalApi): concat zod errors into a single message field (#1673)
For the clickstack api integration work, we need to make sure if there's a 400 bad request on hyperdx side, the error is nicely presented in a single message field, like it is for other errors like 401 and 500. This will make our clickstack openapi show better errors instead of showing "unknown error" because the clickstack proxy in control plane doesn't have the functionality to decipher and format zod errors nicely.

|Before|After|
|--|--|
|<img width="836" height="886" alt="CleanShot 2026-01-29 at 12 15 26@2x" src="https://github.com/user-attachments/assets/36e16371-1a1f-48de-88ac-e7c81ef238f0" />|<img width="1136" height="430" alt="CleanShot 2026-01-29 at 12 15 58@2x" src="https://github.com/user-attachments/assets/d3b70723-9049-4d32-8795-2ca4365ccf03" />|

This will now be similar to other error responses in our v2 external API:

<img width="938" height="676" alt="CleanShot 2026-01-29 at 12 16 33@2x" src="https://github.com/user-attachments/assets/50e9271e-62d8-44e6-b887-fae5dffc4f24" />

Fixes HDX-3309
2026-01-29 12:55:08 +00:00
Drew Davis
f8685bfa9d
Revert "fix: Make pattern sampling query random (#1600)" (#1671) 2026-01-28 15:25:06 -05:00
Karl Power
08b922cd37
debug: notify SourceForm error path when message is 'Required': (#1659)
Closes HDX-3148

As discussed in HDX-3148, we will print the error path in the notification for `SourceForm` validation when the error message is "Required".
2026-01-28 16:14:46 +00:00
Drew Davis
6aa3ac6f70
fix: Fix missing negation in binary lucene expressions (#1658)
Closes HDX-2655

# Summary

This PR fixes an incorrect lucene compilation that disregarded a `NOT` in front of a binary expression.
- eg. `NOT Body:Fetching AND NOT Body:Unsupported` was rendered as `(((Body ILIKE '%Fetching%') AND NOT (Body ILIKE '%Unsupported%')))`

This was due to a missing `ast.start` check, which was present in the `leftOnlyAst` branch, but not in the `binaryAst` branch.
2026-01-28 15:22:04 +00:00
Dan Hable
d07e30d5fb
feat: associate logged in user to clickhouse query (#1636)
Allows setting a custom setting prefix on a connection. When set in HyperDX and the ClickHouse settings, the HyperDX app will set a custom setting for each query. These are recorded in the query log and can be used to identify which user issues the query.

## Testing

The commit also updates the local dev ClickHouse instance to support a custom setting prefix of `hyeprdx`. After running `make dev-up`, you should be able to edit the connection and set the the prefix to `hyperdx`. 

<img width="955" height="197" alt="Screenshot 2026-01-21 at 1 23 14 PM" src="https://github.com/user-attachments/assets/607fc945-d93f-4976-9862-3118b420c077" />

After saving, just allow the app to live tail a source like logs. If you connect to the ClickHouse database, you should then be able to run

```
SELECT query, Settings
FROM system.query_log
WHERE has(mapKeys(Settings), 'hyperdx_user')
FORMAT Vertical
```

and then see a bunch of queries with the user set to your logged in user.

```
Row 46:
───────
query:    SELECT Timestamp, ServiceName, SeverityText, Body, TimestampTime FROM default.otel_logs WHERE (TimestampTime >= fromUnixTimestamp64Milli(_CAST(1769022372269, 'Int64'))) AND (TimestampTime <= fromUnixTimestamp64Milli(_CAST(1769023272269, 'Int64'))) ORDER BY (TimestampTime, Timestamp) DESC LIMIT _CAST(0, 'Int32'), _CAST(200, 'Int32') FORMAT JSONCompactEachRowWithNamesAndTypes
Settings: {'use_uncompressed_cache':'0','load_balancing':'in_order','log_queries':'1','max_memory_usage':'10000000000','cancel_http_readonly_queries_on_client_close':'1','parallel_replicas_for_cluster_engines':'0','date_time_output_format':'iso','hyperdx_user':'\'dan@hyperdx.io\''}
```
2026-01-28 14:58:05 +00:00
Dale McDiarmid
66f56cb1d0
chore: Move schema configs to file (#1635)
Co-authored-by: Tom Alexander <tom.alexander@clickhouse.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-28 14:52:54 +01:00
Drew Davis
16df50244b
fix: Fix tile hover state after closing edit modal (#1657)
Closes HDX-3264

# Summary

This PR fixes a bug that caused dashboard tiles to incorrectly have no hover state after closing the edit modal, but while still hovering over the tile. This happened intermittently, but appeared to be caused by onMouseEnter not being fired reliably when closing the modal. onMouseOver appears to fire reliably, even when onMouseEnter does not. The difference between the events is that onMouseOver will fire more frequently - whenever the mouse enters a new child element. Since the event handler is idempotent, this is not an issue. I confirmed it does not result in extra re-renders.
2026-01-28 13:22:52 +00:00
Himanshu Kapoor
7a5a5ef676
fix: Fix histogram disappearing on event patterns page (#1670) 2026-01-28 14:15:53 +01:00
Drew Davis
eea4fa4897
fix: Prevent orphan alert when duplicating dashboard tiles (#1655)
Closes HDX-3270

# Summary

This PR fixes a bug which caused duplicate, orphaned alerts to be created when duplicating a dashboard tile with an alert.
2026-01-27 15:17:00 +00:00
Mike Shi
4e8173f68e
fix: Add min-width to source selector dropdown to prevent shrinking (#1664)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Mike Shi <MikeShi42@users.noreply.github.com>
Co-authored-by: Elizabet Oliveira <elizabet.oliveira@clickhouse.com>
2026-01-27 14:52:32 +00:00
Elizabet Oliveira
9101a9931e
fix: Update ConnectionForm button variant based on test connection state (#1665)
Changed the button variant in the ConnectionForm component to reflect the test connection state, using 'danger' for invalid states and 'secondary' for others. This improves user feedback during connection testing
2026-01-27 11:40:38 +00:00
Mike Shi
be4b784ce0
fix: Make JSON line hover visible in inline panel (#1646)
Old:
<img width="727" height="437" alt="image" src="https://github.com/user-attachments/assets/bba6926f-4eaf-45d2-9ab3-65720afc03a7" />


New:
<img width="1970" height="1010" alt="image" src="https://github.com/user-attachments/assets/c1a3d413-d28d-43ef-8572-524adbe696e8" />
2026-01-27 02:35:52 +00:00
Karl Power
79ab8746ef
fix: controlled input warning (#1654)
Fixes the SourceForm `name` input switching from uncontrolled to controlled.

<img width="753" height="272" alt="image" src="https://github.com/user-attachments/assets/818a7489-d237-416b-8826-a584ddf49fe5" />
2026-01-26 14:54:25 +00:00
Drew Davis
0dd585437d
fix: Fix dashboard error when using filter on non-String column (#1650)
Closes HDX-3266

# Summary

This PR fixes an error in dashboards that occurred when using a Dashboard filter on a non-String column.

## Demo

Such filters work now:

<img width="1074" height="523" alt="Screenshot 2026-01-23 at 3 44 19 PM" src="https://github.com/user-attachments/assets/2e026590-f4cb-44a2-8677-37a80b65886b" />


Co-authored-by: Karl Power <85935352+karl-power@users.noreply.github.com>
2026-01-26 13:53:52 +00:00
github-actions[bot]
866de771b4
Release HyperDX (#1592)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-23 15:55:50 -08:00
Drew Davis
b2089fa998
fix: Prevent dashboard error when metricName is defined for non-metric source (#1649)
Closes HDX-3236

# Summary

This PR fixes an error that occurs when a metricName/metricType is set for a dashboard tile configuration, despite the queried source not being a metric source.

1. Updates in DBEditTimeChartForm prevent us from saving configurations with metricName/metricType for non metric sources
2. Updates in DBDashboardPage ensure that metricName/metricType is ignored for any saved configurations for non-metric sources.

## Demo

A new tile would be saved with a metricName/Type incorrectly when

1. Create the tile
2. Select a metric source
3. Select a metric name
4. Switch back to a non-metric source
5. Save

And the Dashboard tile would then error:

<img width="1288" height="1012" alt="Screenshot 2026-01-23 at 2 39 38 PM" src="https://github.com/user-attachments/assets/4fa4b0bf-355e-47bb-a504-cd03e0dca2d0" />

Now, the configuration is not saved with metricName/Type, and the dashboard does not error for a saved configuration that has a metricName/Type:

<img width="769" height="423" alt="Screenshot 2026-01-23 at 2 43 04 PM" src="https://github.com/user-attachments/assets/92af36aa-dd46-47b8-ae59-d0e4bfcb28af" />
2026-01-23 20:04:20 +00:00
Elizabet Oliveira
cf3ebb4bfc
feat: Add disabled state support and Storybook stories for Button and ActionIcon components (#1647) 2026-01-23 15:02:20 +00:00
Drew Davis
1603602564
feat: Add HAVING filter to Tables (#1644)
Closes HDX-3230

# Summary

This PR adds a SQL HAVING input to the DBEditTimeChart form when creating table charts.

## Demo

https://github.com/user-attachments/assets/e0ca7de3-a222-473c-9551-696ca6f5c4e2
2026-01-23 14:00:49 +00:00
Karl Power
2371f4f5ef
feat: improve query setting validation (#1648) 2026-01-23 14:25:54 +01:00
Drew Davis
4a85617320
feat: Add hasAllTokens for text index support (#1637)
Closes HDX-3245

# Summary

This PR updates the Lucene to SQL compilation process to generate conditions using `hasAllTokens` when the target column has a text index defined.

`hasAllTokens` has a couple of limitations which are solved for:

1. The `needle` argument must be no more than 64 tokens, or `hasAllTokens` will error. To support search terms with more than 64 tokens, terms are first broken up into batches of 50 tokens, each batch is passed to a separate `hasAllTokens` call. When multiple `hasAllTokens` calls are used, we also use substring matching `lower(Body) LIKE '%term with many tokens...%'`.
2. `hasAllTokens` may only be used when `enable_full_text_index = 1`.  The existence of a text index does not guarantee that `enable_full_text_index = 1`, since the text index could have been created with a query that explicitly specified `SETTINGS enable_full_text_index = 1`. We cannot set this option in every query HyperDX makes, because the setting was not available prior to v25.12. To solve for this, we check the value of `enable_full_text_index` in `system.settings`, and only use `hasAllTokens` if the setting exists and is enabled.

## Testing Setup

### Enable Full Text Index

First, make sure you're running at least ClickHouse 25.12.

Then, update the ClickHouse `users.xml`'s default profile with the following (or otherwise update your user's profile):
```xml
<clickhouse>
    <profiles>
        <default>
            ...
            <enable_full_text_index>1</enable_full_text_index>
        </default>
    </profiles>
    ...
<clickhouse>
```

### Add a Full Text Index

```sql
ALTER TABLE otel_logs ADD INDEX text_idx(Body) 
	TYPE text(tokenizer=splitByNonAlpha, preprocessor=lower(Body))
	SETTINGS enable_full_text_index=1;

ALTER TABLE otel_logs MATERIALIZE INDEX text_idx;
```

## Limitations

1. We currently only support the `splitByNonAlpha` tokenizer. If the text index is created with a different tokenizer, `hasAllTokens` will not be used. If needed, this limitation can be removed in the future by implementing `tokenizeTerm`, `termContainsSeparators`, and token batching logic specific to the other tokenizers.
2. This requires the latest (Beta) version of the full text index and related setting, available in ClickHouse v25.12.
2026-01-22 19:50:08 +00:00
Himanshu Kapoor
9f51920b5d
feat: Add a search input that searches within virtual elements (#1598)
Add a separate search input triggered by Cmd+F that searches through all matches currently on the page, overriding the native browser search that only searches within visible rows.

Fixes HDX-2687

### Video


https://github.com/user-attachments/assets/beaab78f-e96c-4698-86b7-a4ee3540db1b
2026-01-22 18:23:54 +00:00
Karl Power
3a2c33d389
feat: debounce highlighted attribute validation query (#1626)
Follow up to https://github.com/hyperdxio/hyperdx/pull/1576 after feedback from @MikeShi42.

With these changes, validation queries run either when the "Validate expression" button is clicked, or 1 second after the input value was changed for either the expression or the alias.


https://github.com/user-attachments/assets/8a42e3cd-e9da-40a3-95c2-8b037ab766e4
2026-01-22 14:55:09 +00:00