What problem does it solve?
It helps you get useful, queryable PostHog log ingestion working in Next.js by wiring OpenTelemetry Logs to PostHog’s OTLP endpoint with correct Next.js-specific setup.
Core Features & Use Cases
- PostHog log ingestion for Next.js: Enables exporting structured logs from a Next.js app to PostHog using OTLP over HTTP.
- Framework-guided instrumentation: Provides guidance for Next.js instrumentation setup and placement (notably for Next.js 15.3+ via instrumentation-client.ts).
- Production-ready logging guidance: Reinforces best practices like using environment variables, structured key-value attributes, minimal code changes, and trace/session context for correlation.
Quick Start
Add PostHog log ingestion to your Next.js app by configuring an OpenTelemetry logger provider that exports logs to https://us.i.posthog.com/i/v1/logs using your project token from environment variables, and ensure logs are flushed in route handlers.