Commit graph

1170 commits

Author SHA1 Message Date
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
Elizabet Oliveira
cf71a1cb4c
Add text-brand semantic color tokens for theme flexibility (#1631) 2026-01-22 12:34:22 +00:00
Drew Davis
1cf8cebb4b
feat: Support JSON Sessions (#1628) 2026-01-21 19:25:39 -05:00
Warren Lee
db845604a2
fix: bypass aliasWith so that useRowWhere works correctly (#1623)
Revisit the bug fix for https://github.com/hyperdxio/hyperdx/pull/1614.

The alias map should be used in useRowWhere hook

Ref: HDX-3196

Example:
For select
```
Timestamp,ServiceName,SeverityText,Body AS b, concat(b, 'blabla')
```
The generated query from useRowWhere is
```
WITH (Body) AS b
SELECT
    *,
    Timestamp AS "__hdx_timestamp",
    Body AS "__hdx_body",
    TraceId AS "__hdx_trace_id",
    SpanId AS "__hdx_span_id",
    SeverityText AS "__hdx_severity_text",
    ServiceName AS "__hdx_service_name",
    ResourceAttributes AS "__hdx_resource_attributes",
    LogAttributes AS "__hdx_event_attributes"
FROM
    DEFAULT.otel_logs
WHERE
    (
        Timestamp = parseDateTime64BestEffort('2026-01-20T06:11:00.170000000Z', 9)
        AND ServiceName = 'hdx-oss-dev-api'
        AND SeverityText = 'info'
        AND Body = 'Received alert metric [saved_search source]'
        AND concat(b, 'blabla') = 'Received alert metric [saved_search source]blabla'
        AND TimestampTime = parseDateTime64BestEffort('2026-01-20T06:11:00Z', 9)
    )
LIMIT
    1
```
2026-01-21 22:21:40 +00:00
Drew Davis
ddc54e43f0
feat: Allow customizing empty-period fill value (#1617)
Closes HDX-3220
Closes HDX-1718
Closes HDX-3205

# Summary

This PR adds an option that allows users to customize the 0-fill behavior on time charts. The default behavior remains to fill all empty intervals with 0. The user can now disable the filling behavior. When fill is disabled, series will appear to be interpolated.

This PR also consolidates various display settings into a drawer, replacing the existing Number Format drawer. In the process, various form-related bugs were fixed in the drawer, and micro/nano second input factors were added.

## New Chart Display Settings Drawer

<img width="1697" height="979" alt="Screenshot 2026-01-20 at 9 10 59 AM" src="https://github.com/user-attachments/assets/1683666a-7c56-4018-8e5b-2c6c814f0cd2" />

## Zero-fill behavior

Enabled (default):

<img width="1458" height="494" alt="Screenshot 2026-01-20 at 9 12 45 AM" src="https://github.com/user-attachments/assets/0306644e-d2ff-46d6-998b-eb458d5c9ccc" />

Disabled:

<img width="1456" height="505" alt="Screenshot 2026-01-20 at 9 12 37 AM" src="https://github.com/user-attachments/assets/f084887e-4099-4365-af4f-73eceaf5dc3d" />
2026-01-21 22:13:16 +00:00
Brandon Pereira
418828e89d
Fix issue with where clause missing on AI Graph Explorer Responses (#1613)
Sometimes when generating charts, the page would crash.

<img width="4278" height="1886" alt="image" src="https://github.com/user-attachments/assets/befe9d95-9eb6-472f-8e13-792c6056b0f5" />

The fix was to correct the types with the server (so server->app is strongly typed). Sever still sends no where clause, but previously frontend was typed to expect where clause.

This PR also ports some changes from ee to oss to avoid drift between the projects

Fixes HDX-3227
2026-01-21 21:18:19 +00:00
Elizabet Oliveira
5ba7fe009a
style: Rename sidenav background color tokens for clarity and update AppNav hover/focus states (#1632) 2026-01-21 20:32:14 +00:00
Gyanendra Pratap Singh
eef80b7e33
feat: extending AI support for multi-providers (#1590)
## Overview

Adds support for Azure AI Anthropic API endpoints alongside the existing direct Anthropic API, with an extensible architecture that simplifies future integration of additional AI providers (OpenAI, Azure OpenAI, Google Gemini, etc.).

## Problem

HyperDX currently only supports Anthropic's direct API for AI-powered query assistance. Organizations using Azure AI services cannot integrate Anthropic models through Azure's infrastructure.


## Solution

### 1. Core Refactoring

**New `controllers/ai.ts`:**
- Centralized `getAIModel()` function for all AI configuration
- Multi-provider architecture
- Clean separation of concerns from business logic

**Updated `config.ts`:**
- Provider-agnostic environment variables
- Backward compatibility with legacy configuration
- Clear migration path for existing deployments

**Simplified `routers/api/ai.ts`:**
- Removed inline AI configuration
- Single line: `const model = getAIModel()`
- Business logic unchanged

### 2. Configuration

#### New Environment Variables (Recommended)
```AI_PROVIDER=anthropic              # Provider selection
AI_API_KEY=your-api-key           # API key for any provider
AI_BASE_URL=https://...           # Optional: Custom endpoint
AI_MODEL_NAME=model-name          # Optional: Model/deployment name
```

#### Legacy Variables (Still Supported)
```
ANTHROPIC_API_KEY=sk-ant-api03-xxx  # Auto-detected if no AI_PROVIDER set
```


### Fixes #1588

Co-authored-by: Brandon Pereira <7552738+brandon-pereira@users.noreply.github.com>
2026-01-21 19:46:35 +00:00
Elizabet Oliveira
1ed1ebf34f
feat(app): unify chart color system with accessible palette (#1627) 2026-01-21 18:19:09 +00:00
Brandon Pereira
72d89989d2
fix: sessions subpanel not being closable (#1634) 2026-01-21 10:10:52 -07:00
Karl Power
bc8c4eec9a
feat: allow applying session settings to queries (#1609)
Closes HDX-3154

This PR adds a feature that allows the user to add settings to a source. These settings are then added to the end of every query that is rendered through the `renderChartConfig` function, along with any other chart specific settings. 

See: https://clickhouse.com/docs/sql-reference/statements/select#settings-in-select-query

Most of the work was to pass the `source` or `source.querySettings` value through the code to the `renderChartConfig` calls and to update the related tests. There are also some UI changes in the `SourceForm` components.

`SQLParser.Parser` from the `node-sql-parser` throws an error when it encounters a SETTINGS clause in a sql string, so a function was added to remove that clause from any sql that is passed to the parser. It assumes that the SETTINGS clause will always be at the end of the sql string, it removes any part of the string including and after the SETTINGS clause.


https://github.com/user-attachments/assets/7ac3b852-2c86-4431-88bc-106f982343bb
2026-01-21 16:07:30 +00:00
Mike Shi
00854da8e2
Add support for full text search on bloom_filter(tokens(..)) (#1620)
Resolves HDX-1977

Co-authored-by: Drew Davis <6097246+pulpdrew@users.noreply.github.com>
2026-01-21 14:55:02 +00:00
Drew Davis
66b1a48a8b
fix: Disable usePresetDashboardFilters request in local mode (#1625)
Closes HDX-3197

# Summary

This PR ensures that API requests for fetch preset dashboard filters are not made when in local mode.

In the play / demo environment, the filter requests fail due to the lack of an API:
<img width="417" height="356" alt="Screenshot 2026-01-20 at 9 44 53 AM" src="https://github.com/user-attachments/assets/c61187cb-044c-420d-ad52-6bf878292035" />

With these changes, no filter requests are made in local mode (in the preview environment)
<img width="453" height="415" alt="Screenshot 2026-01-20 at 9 45 06 AM" src="https://github.com/user-attachments/assets/a66f334f-309f-47e2-b7f8-fc160b68ca50" />

Filters still load when not in local mode:
<img width="1470" height="163" alt="Screenshot 2026-01-20 at 9 46 24 AM" src="https://github.com/user-attachments/assets/4b420cf1-79fa-4dc3-827b-16a8b79bf10c" />
2026-01-20 18:17:21 +00:00
Drew Davis
9725a1fc9c
chore: Remove beta label from MVs (#1624)
Closes HDX-3223

# Summary

This PR removes the Beta label from materialized views, now that the following limitations have been addressed

1. MVs now support alerts
2. Charts are now auto-aligned with MV granularity

<img width="944" height="802" alt="Screenshot 2026-01-20 at 9 43 46 AM" src="https://github.com/user-attachments/assets/a05dcef0-9074-4610-8516-fb1b8e93941c" />
<img width="639" height="490" alt="Screenshot 2026-01-20 at 9 43 29 AM" src="https://github.com/user-attachments/assets/0b078f9b-30e2-4920-898d-95d64ee453d4" />
2026-01-20 16:00:17 +00:00
Alok Kumar Singh
94ddc7ebaa
feat(app): Add fullscreen panel view for dashboard charts (#1581)
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Drew Davis <drew.davis@clickhouse.com>
2026-01-20 09:47:16 -05:00
Elizabet Oliveira
824a19a7b9
refactor(app-nav): reorganize AppNav component structure and improve maintainability (#1621) 2026-01-20 12:35:04 +00:00
Warren Lee
bf553d68d9
Revert "fix: alias reference bug in processRowToWhereClause (#1614)" (#1622)
This reverts commit a4b06044dc.

The change introduced regression to the trace waterfall
2026-01-20 01:13:05 +00:00
Warren Lee
a4b06044dc
fix: alias reference bug in processRowToWhereClause (#1614)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-01-16 10:01:45 -08:00
Elizabet Oliveira
5b3ce9fc7c
Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
Drew Davis
1d96140909
fix: Set correct values when opening number format form (#1616) 2026-01-16 09:08:36 -05:00
Himanshu Kapoor
190c66b8df
fix: Validate column names when saving dashboard tiles (#1615)
Similar to https://github.com/hyperdxio/hyperdx/pull/1597, verify column names for validation errors when saving dashboard tiles too.


https://github.com/user-attachments/assets/ff9ec648-47da-433f-abe0-cc779aba1a76
2026-01-16 13:11:00 +00:00
Drew Davis
7d74185a72
test: Add E2E tests for Dashboard Filters (#1612)
Closes HDX-2501

# Summary

This PR adds tests for dashboard filters.
- Create filter (from both log and metric sources)
- Delete filter
- Filters are populated with values from the source
- Filters are applied to dashboard tiles
2026-01-15 22:29:21 +00:00
Drew Davis
de68052778
fix: Make pattern sampling query random (#1600)
Closes HDX-2873

# Summary

This PR backports a change to the event patterns sampling query from the EE repo. This change makes the event patterns sample random subset of the rows, rather than just a subset of the rows based on a LIMIT.
2026-01-15 18:18:26 +00:00
Drew Davis
64998e0f30
fix: Fix dashboard filters queried from metric tables (#1607)
Closes HDX-3218

# Summary

This PR fixes a bug which caused dashboard filters which are based on values from metric tables to not be populated.

## Before

MetricName does not load

<img width="484" height="181" alt="Screenshot 2026-01-14 at 6 22 07 PM" src="https://github.com/user-attachments/assets/6d1127d6-4105-4da0-9c11-3efa1273cabb" />

## After

Both filters load

<img width="567" height="480" alt="Screenshot 2026-01-14 at 6 22 58 PM" src="https://github.com/user-attachments/assets/f3a02509-664a-4c6b-9272-317076dd28e9" />
2026-01-15 17:53:33 +00:00
Drew Davis
18222cd3ea
fix: Fix accuracy of ClickHouse inserts chart (#1599)
Closes HDX-3163

# Summary

This PR fixes a couple of accuracy issues in the Inserts per Table chart on the ClickHouse dashboard

1. Previously, written rows and written bytes would be 0 for any async inserts. To account for async insert rows/bytes, we now filters for AsyncInsertFlush events in the query log
2. Previously, insert queries were double-counted because we were counting both QueryStart and QueryFinish events. Now we will only count QueryStart events.

<img width="1366" height="415" alt="Screenshot 2026-01-14 at 10 30 57 AM" src="https://github.com/user-attachments/assets/b1faa813-7a84-4009-8145-9a04338413e4" />
<img width="1366" height="417" alt="Screenshot 2026-01-14 at 10 30 53 AM" src="https://github.com/user-attachments/assets/899ce3f0-b1ea-4a9b-aede-b6d7408ac4d2" />
<img width="1368" height="420" alt="Screenshot 2026-01-14 at 10 30 44 AM" src="https://github.com/user-attachments/assets/47d18932-5972-4be0-8a36-0c0fa7e3c995" />
2026-01-15 17:45:50 +00:00
Aaron Knudtson
f20fac30b1
feat: force usage of the map key index with lucene rendered queries (#1606)
We have indices like `INDEX idx_log_attr_key mapKeys(LogAttributes) TYPE bloom_filter(0.01) GRANULARITY 1` that track whether a key likely exists for one of the maps in a granule. ClickHouse actually rarely uses this, mostly just for strict equality queries. We have many more scenarios where this is useful. 

This PR adds an expression to the rendered SQL for many Lucene queries. For a full list of scenarios, check the added test cases.

The condition added is `indexHint(mapContains(LogAttributes, 'key'))`. This should never change the outcome of a query because `indexHint` always returns `true`, it just hints to the planner that an index can be used. `mapContains` is the specific condition that tells ClickHouse.

Closes HDX-3070
2026-01-15 16:28:51 +00:00
Drew Davis
acefcbeda7
fix: Fix K8s events query for JSON schema (#1605)
Closes HDX-2738
Closes #1327

# Summary

This PR fixes the Kubernetes Warning Events table for JSON schemas.

## Before

JSON schema was broken

<img width="1200" height="361" alt="Screenshot 2026-01-14 at 2 49 05 PM" src="https://github.com/user-attachments/assets/7484599d-2f48-4386-a577-eeb58b224f28" />

## After

Map-schema and JSON schema both work:

<img width="1189" height="368" alt="Screenshot 2026-01-14 at 2 00 10 PM" src="https://github.com/user-attachments/assets/b6932d33-517f-4449-9503-a9f15d6072bb" />
<img width="1193" height="374" alt="Screenshot 2026-01-14 at 1 59 59 PM" src="https://github.com/user-attachments/assets/e47c0268-a2da-4e7a-a229-a6f5d3d9c448" />
2026-01-15 15:58:48 +00:00
Himanshu Kapoor
ac3082a5ac
fix: Validate column name for metrics when creating charts (#1597)
When creating a chart, validate input before executing the query, so that we show a validation error instead of a query execution error if the column name is empty. The error state on a particular input is cleared once the input is populated.

Fixes HDX-1792.

Screenshots

## Before:

<img width="2599" height="791" alt="image" src="https://github.com/user-attachments/assets/3965d6d1-4e2f-444d-80ac-70ba4f148afa" />

## After:

### Error state:

<img width="2184" height="1438" alt="CleanShot 2026-01-13 at 19 57 17@2x" src="https://github.com/user-attachments/assets/86bb5e60-7d60-4f38-a30c-170524dd32d4" />

### Video:


https://github.com/user-attachments/assets/27382379-cb10-43cb-acd4-8f97cc257511
2026-01-15 15:23:20 +00:00
Karl Power
7a8b261be7
feat: allow validating highlighted attribute expressions when creating (#1576)
Co-authored-by: Elizabet Oliveira <elizabet.oliveira@clickhouse.com>
2026-01-15 10:21:27 +01:00
Drew Davis
f98fc51946
perf: Query filter values from MVs (#1591)
Closes HDX-3066

# Summary

This PR improves the performance of Search and Dashboard filters by querying available filter values from materialized views, when possible. The existing `useMultipleGetKeyValues` has been updated to make use of `getKeyValuesWithMVs`, which works as follows:

1. Identify which materialized views support each of the requested keys. Keys must be `dimensionColumns` in the materialized view, the materialized view must support the provided date range, and the materialized view must support the provided filters (determined by running an EXPLAIN query).
2. Split the keys into groups based on which Materialized view can provide their values. Query values for each group using the existing `getKeyValues` function. Sampling is disabled because it is assumed that MVs are small enough to be queried without sampling.
3. Query any keys which are not supported by any materialized view from the base table.

To reduce the number of EXPLAIN queries required to support this, and to generally decrease the number of concurrent requests for filters, Dashboard filter value queries are now batched by source. Values for each batch are then queried using `getKeyValuesWithMVs` (described above).

Other fixes:
1. I've also updated the various filter functions and hooks to support abort signals, so that filter queries are canceled when a query value is no longer needed.
2. The getKeyValues cache key now includes `where` and `filters`, so that the filter values correctly update when new filters or where conditions are added on the search page.
2026-01-14 18:05:11 +00:00
Drew Davis
6752b3f862
fix: Filter DBTraceWaterfall events on timestamp expression (#1604)
Closes HDX-2694
2026-01-14 17:33:46 +00:00
Elizabet Oliveira
78423450b6
feat(app): add variant prop to table components for muted backgrounds (#1603) 2026-01-14 17:23:21 +00:00
Brandon Pereira
d769f88db0
Cleanup Source Objects When Type Changes (#1586)
Currently, if you create a source (ex Metrics Source) then switch it to a traces source (as an example) it does not remove all the keys that only exist on metrics source. This causes the app to error  when rendering some charts.

Fixes HDX-3136
2026-01-13 20:45:01 +00:00
Drew Davis
f39fcdac6a
fix: Refresh metadata after creating new connection in local mode (#1582) 2026-01-13 07:55:12 -05:00
Brandon Pereira
ddc7dd04ed
Improve Search Result Side Panel to fix various bugs (#1587)
1. Ensures that multiple scrollbars are not shown for nested panels (click row -> surrounding context -> repeat a few times)
<img width="1402" height="876" alt="scrollbars" src="https://github.com/user-attachments/assets/f41c99e5-5fcb-47fa-9c40-243dbd926291" />


2. In the same state as above, closing the panel (clicking outside) then clicking another row caused the subpanel to re-open, this isn't ideal (should open to root drawer)
3. fix issue with drawers where you can scroll, then open a nested drawer, the nested drawer would appear incorrectly
<img width="910" height="878" alt="Screenshot 2026-01-09 at 5 10 29 PM" src="https://github.com/user-attachments/assets/fd1fbc0c-4453-46fb-b310-2323ec2792e2" />




Fixes HDX-3171
2026-01-12 18:09:42 +00:00
Drew Davis
5b252211a5
fix: Respect date range URL params on Services dashboard (#1594)
Closes HDX-3189

# Summary

This PR fixes a bug that caused the services dashboard to reset to the default time range on each page load, rather than respecting the URL date range params.

The cause was that a couple of `useEffects` were firing at page load, and submitting a new date range.
2026-01-12 17:48:49 +00:00
Drew Davis
79398be73a
chore: Standardize granularities (#1551)
Closes HDX-3094

# Summary

This PR standardizes available granularities and inferred/auto granularities throughout the app

1. A duplicate convertDateRangeToGranularityString implementation was removed.
2. 10 minute granularity is no longer auto-inferred, because it (in combination with 15 minutes) breaks the property that all granularities are multiples of smaller granularities. Since MVs are only used when the chart granularity is a multiple of the MV granularity, we want to minimize the chance that a MV is 10 minutes and the chart is 15 minutes, or vice versa. To this end, MVs only support 15 minute granularity, and not 10 minute granularity (to align with alerts). By removing the 10 minute granularity from auto granularity inference, we decrease the chance of automatically choosing a granularity that can't be used with an MV.
3. The max buckets argument was standardized to a constant (DEFAULT_AUTO_GRANULARITY_MAX_BUCKETS) with value 60. It is now an optional argument, only passed when a non-default value is required.
2026-01-12 16:51:21 +00:00
github-actions[bot]
547e2bfa21
Release HyperDX (#1542)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-10 22:19:00 +01:00
Drew Davis
1e6987e485
fix: Set better Chart Axis Bounds (#1585)
Closes HDX-3180

# Summary

This PR makes a couple of changes to TimeChart axis bounds

1. Y Axis lower bound is now always 0 unless a series is selected (partial revert of #1572)
2. X-Axis bounds have been adjusted so that
   1. There is no longer an empty partial interval's worth of space at the end of line charts
   2. The first bar of a bar chart no longer overlaps with the Y Axis


## Before

- The first Bar in bar charts overlaps the Y Axis

<img width="1600" height="495" alt="Screenshot 2026-01-09 at 2 55 27 PM" src="https://github.com/user-attachments/assets/13087084-4847-46d5-98d3-85340101d7f3" />

- There is an empty partial (or full) interval at the end of charts

<img width="1611" height="483" alt="Screenshot 2026-01-09 at 2 55 21 PM" src="https://github.com/user-attachments/assets/a286966b-ccfa-485c-8d26-7090f75120e0" />

- Y Axis lower bound is non-zero when no series are selected

<img width="1603" height="388" alt="Screenshot 2026-01-09 at 2 38 54 PM" src="https://github.com/user-attachments/assets/4ca2743a-d484-40b1-b2e6-352aad838070" />
<img width="1623" height="373" alt="Screenshot 2026-01-09 at 2 37 26 PM" src="https://github.com/user-attachments/assets/4a8b9490-9efb-4c75-93b4-edb3321ee0a2" />

## After

- Bars fit fully within the chart domain

<img width="1610" height="503" alt="Screenshot 2026-01-09 at 2 55 42 PM" src="https://github.com/user-attachments/assets/42ab1f62-4c1e-475f-b3be-4bf6ed147dc4" />

- There is no empty space at the end of the line charts
- Y Axis lower bound is always 0 when no series are selected

<img width="1613" height="490" alt="Screenshot 2026-01-09 at 2 55 50 PM" src="https://github.com/user-attachments/assets/ed723a99-2a24-47f2-8ac8-93901f7fbf88" />
2026-01-09 20:49:37 +00:00
Drew Davis
99863885d0
fix: Fix missing dashboard edit icons on search tile (#1583)
# Summary

This PR adds the hover edit/duplicate/delete buttons back to the search tile. They were inadvertently removed as part of #1560 .

## Before

<img width="813" height="430" alt="Screenshot 2026-01-09 at 11 48 32 AM" src="https://github.com/user-attachments/assets/393f402b-b64a-4633-8261-dd169ba2c011" />

## After

<img width="814" height="421" alt="Screenshot 2026-01-09 at 11 48 10 AM" src="https://github.com/user-attachments/assets/9afc368a-5b12-462e-8909-61fe6a581615" />
2026-01-09 17:01:09 +00:00
Drew Davis
0c16a4b3cf
feat: Align date ranges to MV Granularity (#1575)
Closes HDX-3124

# Summary

This PR makes the following changes

1. Date ranges for all MV queries are now aligned to the MV Granularity
2. Each chart type now has an indicator when the date range has been adjusted to align with either the MV Granularity or (in the case of Line/Bar charts) the Chart Granularity.
3. The useQueriedChartConfig, useRenderedSqlChartConfig, and useOffsetPaginatedQuery hooks have been updated to get the MV-optimized chart configuration from the useMVOptimizationExplanation, which allows us to share the `EXPLAIN ESTIMATE` query results  between the MV Optimization Indicator (the lightning bolt icon on each chart) and the chart itself. This roughly halves the number of EXPLAIN ESTIMATE queries that are made.

## Demo

<img width="1628" height="1220" alt="Screenshot 2026-01-08 at 11 42 39 AM" src="https://github.com/user-attachments/assets/80a06e3a-bbfc-4193-b6b7-5e0056c588d3" />
<img width="1627" height="1131" alt="Screenshot 2026-01-08 at 11 40 54 AM" src="https://github.com/user-attachments/assets/69879e3d-3a83-4c4d-9604-0552a01c17d7" />

## Testing

To test locally with an MV, you can use the following DDL

<details>
<summary>DDL For an MV</summary>

```sql
CREATE TABLE default.metrics_rollup_1m
(
   `Timestamp` DateTime,
   `ServiceName` LowCardinality(String),
   `SpanKind` LowCardinality(String),
   `StatusCode` LowCardinality(String),
   `count` SimpleAggregateFunction(sum, UInt64),
   `sum__Duration` SimpleAggregateFunction(sum, UInt64),
   `avg__Duration` AggregateFunction(avg, UInt64),
   `quantile__Duration` AggregateFunction(quantileTDigest(0.5), UInt64),
   `min__Duration` SimpleAggregateFunction(min, UInt64),
   `max__Duration` SimpleAggregateFunction(max, UInt64)
)
ENGINE = AggregatingMergeTree
PARTITION BY toDate(Timestamp)
ORDER BY (Timestamp, StatusCode, SpanKind, ServiceName)
SETTINGS index_granularity = 8192;

CREATE MATERIALIZED VIEW default.metrics_rollup_1m_mv TO default.metrics_rollup_1m
(
    `Timestamp` DateTime,
    `ServiceName` LowCardinality(String),
    `SpanKind` LowCardinality(String),
    `version` LowCardinality(String),
    `StatusCode` LowCardinality(String),
    `count` UInt64,
    `sum__Duration` Int64,
    `avg__Duration` AggregateFunction(avg, UInt64),
    `quantile__Duration` AggregateFunction(quantileTDigest(0.5), UInt64),
    `min__Duration` SimpleAggregateFunction(min, UInt64),
    `max__Duration` SimpleAggregateFunction(max, UInt64)
)
AS SELECT
    toStartOfMinute(Timestamp) AS Timestamp,
    ServiceName,
    SpanKind,
    StatusCode,
    count() AS count,
    sum(Duration) AS sum__Duration,
    avgState(Duration) AS avg__Duration,
    quantileTDigestState(0.5)(Duration) AS quantile__Duration,
    minSimpleState(Duration) AS min__Duration,
    maxSimpleState(Duration) AS max__Duration
FROM default.otel_traces
GROUP BY
    Timestamp,
    ServiceName,
    SpanKind,
    StatusCode;
```
</details>
2026-01-09 16:07:52 +00:00
Mike Shi
9f9629e4cf
fix: Increase span waterfall limit to 50 - 100k spans (#1579) 2026-01-09 16:03:46 +00:00
Drew Davis
8172fba9d7
fix: Fix a couple of visual bugs in Chart titles (#1577)
# Summary

This PR fixes:

1. Dashboard tile buttons wrapping due to long titles
2. ClickHouse dashboard subtitles rendering inline

## Before

<img width="458" height="430" alt="Screenshot 2026-01-08 at 3 47 29 PM" src="https://github.com/user-attachments/assets/a2da49dd-8eab-4aa7-afe2-03927e09820a" />
<img width="1353" height="154" alt="Screenshot 2026-01-08 at 3 47 22 PM" src="https://github.com/user-attachments/assets/d132e625-fbf8-43f4-80f2-a82888261511" />
<img width="692" height="158" alt="Screenshot 2026-01-08 at 3 47 17 PM" src="https://github.com/user-attachments/assets/d8f5c02d-8b82-4cfc-af41-3f52c69be324" />


## After

<img width="463" height="431" alt="Screenshot 2026-01-08 at 3 46 15 PM" src="https://github.com/user-attachments/assets/45d4e917-0589-40b8-85f4-efc837370f1f" />
<img width="453" height="425" alt="Screenshot 2026-01-08 at 3 46 22 PM" src="https://github.com/user-attachments/assets/90bd89e2-96a5-4da4-8686-0adc15cc421d" />

<img width="1359" height="96" alt="Screenshot 2026-01-08 at 3 46 40 PM" src="https://github.com/user-attachments/assets/9282da0a-488c-46da-a564-4ce00bc6a5ee" />
<img width="703" height="210" alt="Screenshot 2026-01-08 at 3 46 33 PM" src="https://github.com/user-attachments/assets/d2d53585-d551-4a0b-bc78-633e4f84e9df" />
2026-01-08 20:57:00 +00:00