Install the SDK
Use Node.js 22.15 or later:Configure your destination
- Fully managed
- Self-managed
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
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.