1. Environment
2. Install
3. Bootstrap file
Createtracelit-otel.cjs and start with:
OTLPLogExporter + BatchLogRecordProcessor). Traces-only setups will never pass the onboarding log check.
4. Log libraries
- pino
- winston
- console
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
OpenTelemetry NodeSDK for Tracelit — Express, Fastify, NestJS, and log libraries.
OTEL_SERVICE_NAME=my-service
OTEL_RESOURCE_ATTRIBUTES=deployment.environment=production
OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.tracelit.app
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer <WORKSPACE_INGEST_KEY>
npm install @opentelemetry/sdk-node @opentelemetry/api \
@opentelemetry/auto-instrumentations-node \
@opentelemetry/exporter-trace-otlp-proto \
@opentelemetry/exporter-logs-otlp-proto \
@opentelemetry/sdk-logs
tracelit-otel.cjs and start with:
NODE_OPTIONS="--require ./tracelit-otel.cjs" <your-start-command>
OTLPLogExporter + BatchLogRecordProcessor). Traces-only setups will never pass the onboarding log check.
npm install pino @opentelemetry/instrumentation-pino
NodeSDK instrumentations:const { PinoInstrumentation } = require('@opentelemetry/instrumentation-pino');
instrumentations: [
getNodeAutoInstrumentations(),
new PinoInstrumentation(),
],
logger.info({ count: 3 }, 'order listed');
logger.error({ err }, 'payment failed');
npm install winston @opentelemetry/instrumentation-winston
const { WinstonInstrumentation } = require('@opentelemetry/instrumentation-winston');
instrumentations: [
getNodeAutoInstrumentations(),
new WinstonInstrumentation(),
],
logger.info('order listed', { count: 3 });
logger.error('payment failed', { err });
NodeSDK starts with a log exporter, or temporarily enable console instrumentation. Then:console.info('order listed');
console.error('payment failed');