Repository navigation
[HDX-5759] Add PromQL support behind hyperdx.promql.enabled - #326
Conversation
🦋 Changeset detectedLatest commit: c9d3705 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
d719595 to
6a3bb51
Compare
Helm template coverage
Uncovered detailscharts/clickstack/templates/NOTES.txtUncovered lines: none Uncovered branches: 37:default:fallback charts/clickstack/templates/_helpers.tplUncovered lines: 17 Uncovered branches: 130:range:empty, 132:range:empty, 133:ternary:false, 16:if:true, 194:or(1):true, 211:range:empty, 242:default:fallback, 243:or(1):true, 259:if:false, 389:range:empty, 410:range:empty charts/clickstack/templates/additional-manifests.yamlUncovered lines: none Uncovered branches: none charts/clickstack/templates/clickhouse/cluster.yamlUncovered lines: none Uncovered branches: none charts/clickstack/templates/clickhouse/keeper.yamlUncovered lines: none Uncovered branches: none charts/clickstack/templates/hyperdx/configmap.yamlUncovered lines: none Uncovered branches: none charts/clickstack/templates/hyperdx/cronjob-check-alerts.yamlUncovered lines: none Uncovered branches: none charts/clickstack/templates/hyperdx/dashboard-configmap.yamlUncovered lines: none Uncovered branches: none charts/clickstack/templates/hyperdx/dashboard-provisioner-rbac.yamlUncovered lines: none Uncovered branches: 40:range:empty charts/clickstack/templates/hyperdx/deployment.yamlUncovered lines: none Uncovered branches: 121:default:fallback, 131:default:fallback, 196:default:fallback, 201:with:empty, 20:with:empty, 25:if:false, 26:default:fallback, 41:if:false, 42:with:empty charts/clickstack/templates/hyperdx/hpa.yamlUncovered lines: none Uncovered branches: 16:with:empty charts/clickstack/templates/hyperdx/ingress.yamlUncovered lines: none Uncovered branches: 15:with:empty, 35:if:false, 40:range:empty, 45:range:empty, 48:with:empty, 54:range:empty, 58:range:empty, 59:or(2):true, 59:or(3):true charts/clickstack/templates/hyperdx/networkpolicy.yamlUncovered lines: none Uncovered branches: 11:with:empty charts/clickstack/templates/hyperdx/pdb.yamlUncovered lines: none Uncovered branches: 10:with:empty charts/clickstack/templates/hyperdx/secret.yamlUncovered lines: none Uncovered branches: 1:or(2):true, 1:or(3):true charts/clickstack/templates/hyperdx/service.yamlUncovered lines: none Uncovered branches: 14:default:fallback, 9:with:empty charts/clickstack/templates/hyperdx/serviceaccount.yamlUncovered lines: none Uncovered branches: none charts/clickstack/templates/mongodb/community.yamlUncovered lines: none Uncovered branches: none charts/clickstack/templates/mongodb/password-secret.yamlUncovered lines: none Uncovered branches: none charts/clickstack/templates/otel-collector/custom-config.yamlUncovered lines: none Uncovered branches: none |
6a3bb51 to
3e4a394
Compare
Deep ReviewPromQL behind ✅ No critical issues found. 🟡 P2 — recommended
Reviewers (6): correctness, testing, maintainability, project-standards, security, adversarial. Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. |
[HDX-5759] Add PromQL support behind hyperdx.promql.enabled
Adds a
hyperdx.promql.enabledtoggle (on by default) that enables PromQL end to end: HyperDX feature flags, a PromQL default source, and the ClickHouse config the TimeSeries engine and Prometheus endpoints need.hyperdx.promql.enabled: trueand deriveENABLE_PROMQL/NEXT_PUBLIC_ENABLE_PROMQLfrom it inhyperdx.config.PromQLentry tohyperdx.deployment.defaultSourcesondefault.metrics_ts. HyperDX only seedspromqlsources whenENABLE_PROMQLis true, so the entry is inert when the toggle is off.ClickHouseClusterCR when the toggle is on and the server image tag is 26.6 or newer: Prometheusmetrics/write/readhandlers on the metrics port, aprometheus_api_v1handler on/prometheus/api/v1, andallow_experimental_time_series_table: 1on the default profile. User values undersettings.extraConfig/extraUsersConfigwin over the injected ones.appuserCREATE TEMPORARY TABLE ON *.*. Theprometheus_api_v1handler reads through thetimeSeriesSelector()table function and ClickHouse gates all table functions behind that privilege (src/TableFunctions/ITableFunction.cpp,checkCreateTemporaryTableAccess).-alpinestyle suffixes to semver; a tag with no version (e.g.latest) is treated as new enough.minor) anddocs/UPGRADE.mdnote: ClickHouse pods restart once; users pinning ClickHouse < 26.6 should sethyperdx.promql.enabled: false.Testing
make test(316 unit tests),make coverage(99.86% line / 90.44% branch),make docs.ClickHouseClusterreconciles to Ready with the injected config./metricsreturns 200,/writeand/readexist on 9363 (415/500 on empty bodies, not 404).GET /prometheus/api/v1/query?query=up&database=default&table=metrics_tsreturns{"status":"success"}as theappuser.metrics_tswithENGINE = TimeSeries; after a team exists HyperDX pushes aprometheusremotewriteexporter to the collector. An OTLP gauge sent to the collector was queried back via PromQL.hyperdx.promql.enabled=falseor tag25.7-alpine, the CR carries no PromQL settings.References
docker/clickhouse/local/config.xml,docker/clickhouse/local/users.xmlin ClickHouse/ClickStackENABLE_PROMQLgating: feat: provision a PromQL source in the dev default sources ClickStack#3311