Install the SDK
Use Node.js 22.15 or later:Configure your destination
Set the OTLP HTTP endpoint and ingestion key for your ClickStack collector. Usehttp:// if your collector does not have TLS configured. For collector setup, see Ingesting with OpenTelemetry.
Start your application
SetOTEL_SERVICE_NAME to identify your application. Build your NestJS application, then preload the SDK before the compiled entry point:
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.