PostHog Log Instrumentation

•
63
•

Instruments applications with PostHog log capture and OpenTelemetry exporters to capture structured, searchable log events.

The PostHog Log Instrumentation skill enables Claude Code to detect your project stack, configure OpenTelemetry (OTLP) log exporters, and instrument code with structured logging. Designed for use after developing features or during code reviews, it supports a wide array of ecosystems—including Next.js, Node.js, Python, Go, Java, Android, iOS, and React Native. It integrates seamlessly alongside existing log handlers, auto-detects PostHog environment configuration via the PostHog MCP server, and enforces structured key-value logging best practices without disrupting existing application architecture.

主な機能

01OpenTelemetry (OTLP) exporter setup pointing directly to PostHog ingest endpoints
02Non-destructive integration alongside existing logging libraries (Winston, Pino, Logrus, Log4j, etc.)
03Automatic stack and logging framework detection across web, backend, and mobile platforms
0463 GitHub stars
05Automated environment variable resolution via PostHog MCP server with US/EU cloud support
06Structured key-value property injection for enhanced filtering and querying in PostHog

ユースケース

01Adding structured logging with context properties when implementing new features or reviewing PRs
02Setting up OpenTelemetry log export to PostHog for newly created or legacy services
03Connecting native mobile logs (iOS, Android, React Native, Flutter) directly to PostHog observability