|
| 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`. |
0 commit comments