Skip to content

Commit 990372d

Browse files
Merge branch 'main' into aaron/webhook-harden-dns-check
2 parents 704f830 + 142c9cc commit 990372d

108 files changed

Lines changed: 4891 additions & 2065 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@hyperdx/common-utils': minor
3+
'@hyperdx/app': minor
4+
---
5+
6+
feat: narrow ad hoc dashboard filter suggestions with a condition
7+
8+
An ad hoc filter on SQL sources can now carry a SQL or Lucene "Keys and values
9+
filter", like a queried filter's dropdown values filter, that limits the rows
10+
its keys and values are suggested from. It can reference the dashboard's other
11+
variables. While it references a required filter with nothing selected, the ad
12+
hoc filter can't add or edit conditions and names the filter it is waiting on.
13+
Failed suggestions now show the database's error message.

‎.changeset/clickstack-sdks.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
'@hyperdx/api': minor
3+
'@hyperdx/app': minor
4+
---
5+
6+
feat: self-instrument with `@clickhouse/clickstack-node` and
7+
`@clickhouse/clickstack-browser` instead of `@hyperdx/node-opentelemetry` and
8+
`@hyperdx/browser`
9+
10+
HyperDX's own telemetry changes shape. HTTP spans use the stable semantic
11+
convention keys (`http.request.method`, `http.response.status_code`,
12+
`url.full`). pino records come from the `@opentelemetry/instrumentation-pino`
13+
scope with real severity numbers instead of the `node-logger` scope with
14+
severity number 0. Console capture covers every `console` call in the API, and
15+
browser console output is recorded as log records instead of spans. Uncaught
16+
exceptions are recorded as FATAL log records, and API errors as an exception
17+
event on the Express span instead of a separate error span.
18+
19+
Browser telemetry records the user as `user.id`, `user.email` and `user.name`
20+
instead of `userEmail` and `userName`, keeps the team name as `teamName`, and no
21+
longer records a `user navigated` action. Browser fetch and XHR spans no longer
22+
record request and response headers or bodies. Browser sessions restart once
23+
after the upgrade. The per-signal browser endpoints and
24+
`NEXT_PUBLIC_OTEL_RESOURCE_ATTRIBUTES` work as before. Browser traces and logs
25+
are now sent gzip-compressed every 5 seconds. If the browser sends to a
26+
collector other than ClickStack's, its CORS `allowed_headers` must be `"*"` or
27+
include `content-type` and `content-encoding` (and `authorization`), and a proxy
28+
in front of it must forward `Content-Encoding` unchanged.
29+
30+
The Next.js server now sends its own telemetry in production builds too, not
31+
only under `next dev`, when `HYPERDX_API_KEY` or `OTEL_EXPORTER_OTLP_HEADERS` is
32+
set. `HDX_EXPORTER_ENABLED=false` turns it off along with browser telemetry. It
33+
reports under its own service name, the configured one plus `-next`
34+
(`hdx-oss-app-next` in the docker-compose `app` service and when no name is
35+
set), so its spans stay apart from the API's and the browser's. The HyperDX
36+
images now default `OTEL_SERVICE_NAME` to `hdx-oss-app`. Each `/api` request
37+
adds Next.js server spans for the proxy hop. Requests for build and `public/`
38+
assets, such as `/_next/static/*`, `/__ENV.js` and `/pyodide/*`, are not traced.
39+
40+
`HYPERDX_API_KEY` still enables self-instrumentation. Without
41+
`OTEL_EXPORTER_OTLP_ENDPOINT`, server-side self-telemetry now goes to
42+
`http://localhost:4318` instead of `https://in-otel.hyperdx.io`, so set the
43+
endpoint explicitly. `HDX_NODE_*` variables are no longer read. For request
44+
headers and bodies set `OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_*` and
45+
`CLICKSTACK_CAPTURE_HTTP_BODY`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@hyperdx/api': patch
3+
'@hyperdx/otel-collector': patch
4+
---
5+
6+
fix: let browsers cache the collector's CORS preflights for 10 minutes
7+
8+
The OTLP receiver now answers preflights with `Access-Control-Max-Age: 600`.
9+
Without it, browsers cached a preflight for only 5 seconds, which is how often
10+
the browser SDK exports, so about half of its requests were preflights.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@hyperdx/api': patch
3+
---
4+
5+
fix: MCP tool responses that are over the size budget now shorten long strings with a `…(+N chars)` suffix instead of replacing them, say what was trimmed in `trimNotes`, and `clickstack_event_patterns` / `clickstack_emerging_signals` drop samples and shorten long patterns before cutting whole patterns, so the requested `topN` survives when it can
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@hyperdx/api': patch
3+
---
4+
5+
fix: update systeminformation to 5.33.19
6+
7+
The root `resolutions` pin let the lockfile keep systeminformation 5.30.7, which
8+
has known command injection advisories, including two high-severity ones in
9+
`networkInterfaces()` on Linux (GHSA-5xpp-75jx-m839, GHSA-hvx9-hwr7-wjj9). The
10+
API installs it through `@opentelemetry/instrumentation-host-metrics`, which
11+
asks for `^5.31.6`, but the old pin held it at 5.30.7. The pin now starts at
12+
5.33.19, the newest 5.x release, which fixes all of them.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@hyperdx/api': patch
3+
'@hyperdx/common-utils': patch
4+
---
5+
6+
fix: PromQL label lookups (dashboard variables, label autocomplete) now work on TimeSeries tables of schema version 8, the default from ClickHouse 26.10. These keep each series' time range in a separate time ranges table instead of the tags table's min_time/max_time, so match[] failed with "requires store_min_time_and_max_time = 1" and time-bounded lookups read the whole tags table.

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# One reviewer is picked round robin by the team's code review settings.
2-
* @ClickHouse/clickstack-app-devs
2+
* @ClickHouse/clickstack

‎.github/images/search_splash.png‎

-269 KB
Loading

‎.github/workflows/e2e-tests.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ jobs:
1010
# over-subscribed the 4-vCPU ubuntu-24.04 runner and caused timeouts.
1111
# RUNNER_E2E is a label or a JSON array of labels. On a smaller
1212
# runner, set the E2E_WORKERS variable to 2 as well.
13+
# Fork PRs can't use the custom runner group and would queue forever, so
14+
# they fall back to the 4-vCPU ubuntu-24.04 runner with 2 workers and a
15+
# longer timeout.
1316
runs-on:
14-
${{ startsWith(vars.RUNNER_E2E, '[') && fromJSON(vars.RUNNER_E2E) ||
17+
${{ github.event.pull_request.head.repo.fork && 'ubuntu-24.04' ||
18+
startsWith(vars.RUNNER_E2E, '[') && fromJSON(vars.RUNNER_E2E) ||
1519
vars.RUNNER_E2E || '8-core-playwright' }}
16-
timeout-minutes: 15
20+
timeout-minutes: ${{ github.event.pull_request.head.repo.fork && 25 || 15 }}
1721
permissions:
1822
contents: read
1923
strategy:
@@ -31,7 +35,9 @@ jobs:
3135
- name: Run Playwright tests (full-stack mode)
3236
env:
3337
# Unset falls back to the default in playwright.config.ts.
34-
E2E_WORKERS: ${{ vars.E2E_WORKERS }}
38+
E2E_WORKERS:
39+
${{ github.event.pull_request.head.repo.fork && '2' ||
40+
vars.E2E_WORKERS }}
3541
run: |
3642
cd packages/app
3743
yarn test:e2e --shard=${{ matrix.shard }}/4

‎CONTRIBUTING.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ yarn dev:down
214214

215215
To enable self-instrumentation and demo logs, you can set the `HYPERDX_API_KEY`
216216
to your ingestion key (visit the Team settings page after creating your account).
217+
The API and the Next.js server pass it to the ClickStack SDK
218+
(`@clickhouse/clickstack-node`) as `apiKey`, and the browser SDK
219+
(`@clickhouse/clickstack-browser`) gets it from `/api/config`. The API and the
220+
alert task report as `hdx-oss-dev-api`, the Next.js server as
221+
`hdx-oss-dev-app-next`, and the browser as `hdx-oss-dev-app`.
217222

218223
To do this, create a `.env.local` file in the root of the project and add the
219224
following:

0 commit comments

Comments
 (0)