Skip to main content
Use the ClickStack Node.js SDK to collect telemetry from your NestJS application and send it to ClickHouse Observability. It includes NestJS request instrumentation and captures console output.

Install the SDK

Use Node.js 22.15 or later:

Configure your destination

Open Team Settings → Data → Managed Telemetry in your service and copy the OTLP HTTP endpoint and API key. Use the complete HTTPS endpoint, including its port:

Start your application

Set OTEL_SERVICE_NAME to identify your application. Build your NestJS application, then preload the SDK before the compiled entry point:
Adjust dist/main.js to match your build output. If you use ts-node or another transpiler that hooks require, use --require @clickhouse/clickstack-node/register instead. Keep the SDK and instrumented dependencies external if you bundle your application. You can continue using NestJS’s default console logger. For a custom logger, use a supported integration such as Winston or Pino. For configuration and compatibility details, see the Node.js guide.

Verify ingestion

Make a request to a controller and emit a log message. In ClickHouse Observability, select a recent time range and find your application’s service name in Logs and Traces. Check Metrics after allowing time for export.