hyperdx/packages/app/src
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
..
__mocks__ chore: Update to next 16, react 19, add react compiler (#1434) 2025-12-04 23:40:59 +00:00
__tests__ feat: allow applying session settings to queries (#1609) 2026-01-21 16:07:30 +00:00
components feat: allow applying session settings to queries (#1609) 2026-01-21 16:07:30 +00:00
config Fix font rendering issue (#1448) 2025-12-05 16:50:38 +00:00
hooks feat: allow applying session settings to queries (#1609) 2026-01-21 16:07:30 +00:00
mocks feat: Updated AppNav user panel (#422) 2024-06-03 15:58:17 -07:00
stories refactor(app-nav): reorganize AppNav component structure and improve maintainability (#1621) 2026-01-20 12:35:04 +00:00
theme feat(app): refactor Sources components and add custom Mantine UI variants (#1561) 2026-01-07 14:02:36 +00:00
utils fix: Refresh metadata after creating new connection in local mode (#1582) 2026-01-13 07:55:12 -05:00
AlertsPage.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
api.ts feat: allow applying session settings to queries (#1609) 2026-01-21 16:07:30 +00:00
AuthLoadingBlocker.tsx first commit 2023-09-12 20:08:05 -07:00
AuthPage.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
AutocompleteInput.tsx chore: Update to next 16, react 19, add react compiler (#1434) 2025-12-04 23:40:59 +00:00
BenchmarkPage.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
ChartUtils.tsx chore: Standardize granularities (#1551) 2026-01-12 16:51:21 +00:00
Checkbox.tsx Add rate aggFn support for sum metrics (#77) 2023-10-31 00:06:17 -07:00
clickhouse.ts Team query timeout setting (#1072) 2025-08-30 02:42:05 +00:00
ClickhousePage.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
Clipboard.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
config.ts feat: team setting to disable fetching field metadata (#1034) 2025-07-29 18:01:26 +00:00
connection.ts refactor: decouple clickhouse client into browser.ts and node.ts (#1119) 2025-08-29 16:40:28 +00:00
dashboard.ts fix: display "temporary dashboard" banner until dashboard is created (#1554) 2026-01-05 18:31:12 +01:00
DashboardFilters.tsx test: Add E2E tests for Dashboard Filters (#1612) 2026-01-15 22:29:21 +00:00
DashboardFiltersModal.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
DBChartPage.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
DBDashboardImportPage.tsx chore: update watch uses to useWatch (#1516) 2025-12-23 16:34:48 +00:00
DBDashboardPage.tsx feat(app): Add fullscreen panel view for dashboard charts (#1581) 2026-01-20 09:47:16 -05:00
DBSearchPage.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
DBSearchPageAlertModal.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
DBServiceMapPage.tsx chore: update watch uses to useWatch (#1516) 2025-12-23 16:34:48 +00:00
defaults.ts Team query timeout setting (#1072) 2025-08-30 02:42:05 +00:00
DOMPlayer.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
fixtures.ts chore: Set up Stylelint, set up path aliases (#458) 2024-07-08 10:06:45 -07:00
fonts.ts Fix font rendering issue (#1448) 2025-12-05 16:50:38 +00:00
GranularityPicker.tsx chore: Standardize granularities (#1551) 2026-01-12 16:51:21 +00:00
HDXMarkdownChart.tsx refactor: Add ChartContainer component with toolbar (#1560) 2026-01-07 15:29:35 -05:00
hdxMTViews.ts feat: allow applying session settings to queries (#1609) 2026-01-21 16:07:30 +00:00
HDXMultiSeriesTableChart.stories.tsx chore: Update to next 16, react 19, add react compiler (#1434) 2025-12-04 23:40:59 +00:00
HDXMultiSeriesTableChart.tsx feat(app): add variant prop to table components for muted backgrounds (#1603) 2026-01-14 17:23:21 +00:00
HDXMultiSeriesTimeChart.tsx fix: Set better Chart Axis Bounds (#1585) 2026-01-09 20:49:37 +00:00
Icon.tsx Refactor: Remove bootstrap, adopt semantic tokens, and improve Mantine UI usage (#1347) 2025-11-14 18:01:54 +00:00
InstallInstructionsModal.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
instrumentation.ts feat: single app image (#519) 2024-12-06 16:27:23 -08:00
JoinTeamPage.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
KubernetesDashboardPage.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
LandingHeader.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
LandingPage.tsx feat: move v2 codes 2024-11-12 05:53:15 -07:00
layout.tsx refactor(app-nav): reorganize AppNav component structure and improve maintainability (#1621) 2026-01-20 12:35:04 +00:00
Logo.tsx Refactor: Remove bootstrap, adopt semantic tokens, and improve Mantine UI usage (#1347) 2025-11-14 18:01:54 +00:00
LogSidePanelElements.stories.tsx chore: Update to next 16, react 19, add react compiler (#1434) 2025-12-04 23:40:59 +00:00
LogSidePanelElements.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
metadata.ts chore to move critical path files (#1314) 2025-10-30 15:16:33 +00:00
NamespaceDetailsSidePanel.tsx perf: Query filter values from MVs (#1591) 2026-01-14 18:05:11 +00:00
nextra.config.tsx chore: Upgrade to Next 13 + React 18 🎉 (#298) 2024-02-09 07:45:44 +00:00
NodeDetailsSidePanel.tsx perf: Query filter values from MVs (#1591) 2026-01-14 18:05:11 +00:00
OnboardingChecklist.tsx Remove Bootstrap Icons (#1480) 2025-12-15 17:06:40 +00:00
otelSemanticConventions.ts feat: revisit Otel metrics semantic convention migration logics (#1267) 2025-10-14 22:06:31 +00:00
PasswordCheck.tsx Remove Bootstrap Icons (#1480) 2025-12-15 17:06:40 +00:00
Playbar.tsx chore: add lint rules to treat missing hook dependencies as errors (#1420) 2025-12-01 19:12:46 -05:00
PlaybarSlider.tsx Refactor: Remove bootstrap, adopt semantic tokens, and improve Mantine UI usage (#1347) 2025-11-14 18:01:54 +00:00
PodDetailsSidePanel.tsx perf: Query filter values from MVs (#1591) 2026-01-14 18:05:11 +00:00
savedSearch.ts feat: Store createdBy user ids on alert documents (#1058) 2025-08-12 15:21:17 +00:00
searchFilters.tsx feat: Filter on isRootSpan column if present (#1461) 2025-12-12 14:11:42 +00:00
SearchInputV2.tsx Remove Bootstrap Icons (#1480) 2025-12-15 17:06:40 +00:00
serviceDashboard.ts fix: Backport Services Dashboard fixes (#1446) 2025-12-04 20:40:13 +00:00
ServicesDashboardPage.tsx fix: Disable usePresetDashboardFilters request in local mode (#1625) 2026-01-20 18:17:21 +00:00
SessionEventList.tsx Remove Bootstrap Icons (#1480) 2025-12-15 17:06:40 +00:00
sessions.ts feat: allow applying session settings to queries (#1609) 2026-01-21 16:07:30 +00:00
SessionSidePanel.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
SessionsPage.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
SessionSubpanel.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
setupTests.tsx feat: Align date ranges to MV Granularity (#1575) 2026-01-09 16:07:52 +00:00
source.ts feat: allow applying session settings to queries (#1609) 2026-01-21 16:07:30 +00:00
Spotlights.tsx Remove @ts-nocheck from frontend files to ensure app is fully typechecked (#1530) 2025-12-29 17:15:38 +00:00
SVGIcons.tsx Improvements to Webhooks Section (#1522) 2025-12-23 20:53:50 +00:00
TabBar.tsx chore: add data-test-ids to components (#1167) 2025-09-15 13:49:18 +00:00
TabBarWithContent.tsx first commit 2023-09-12 20:08:05 -07:00
TabItem.tsx Refactor: Remove bootstrap, adopt semantic tokens, and improve Mantine UI usage (#1347) 2025-11-14 18:01:54 +00:00
tableUtils.tsx Stack Trace and Breadcrumbs table polish (#112) 2023-11-20 22:43:01 -07:00
TeamPage.tsx feat: allow applying session settings to queries (#1609) 2026-01-21 16:07:30 +00:00
ThemeWrapper.tsx Fix minor UI issues (#1382) 2025-11-20 15:00:42 +00:00
TimelineChart.tsx feat: Add span event annotations to waterfall view (#1523) 2025-12-29 16:40:21 +00:00
timeQuery.ts feat: buffer and flush parallelized window queries to always flush inorder data (#1481) 2025-12-15 15:56:31 +00:00
types.ts Improvements to Webhooks Section (#1522) 2025-12-23 20:53:50 +00:00
useConfirm.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
useFormatTime.tsx chore to move critical path files (#1314) 2025-10-30 15:16:33 +00:00
useNextraSeoProps.ts feat: move v2 codes 2024-11-12 05:53:15 -07:00
useQueryParam.tsx feat: move v2 codes 2024-11-12 05:53:15 -07:00
UserPreferencesModal.tsx Standardize Button/ActionIcon variants and enforce via ESLint (#1610) 2026-01-16 14:42:16 +00:00
useSourceMappedFrame.tsx Port log details panel elements (#454) 2024-07-11 21:46:54 +00:00
useUserPreferences.tsx Fix font rendering issue (#1448) 2025-12-05 16:50:38 +00:00
utils.ts feat: allow applying session settings to queries (#1609) 2026-01-21 16:07:30 +00:00
vsc-dark-plus.ts first commit 2023-09-12 20:08:05 -07:00
zIndex.ts first commit 2023-09-12 20:08:05 -07:00