npx skills add ...
npx skills add posthog/skills --skill omnibus-instrument-logs
npx skills add posthog/skills --skill omnibus-instrument-logs
Add PostHog log capture to track application logs. Use after implementing features or reviewing PRs to ensure meaningful log events are captured with structured properties. Also handles initial OTLP exporter setup if not yet configured.
Use this skill to add PostHog log capture for new or changed code. Use it after implementing features or reviewing PRs to ensure meaningful log events are captured with structured properties. If PostHog log export is not yet configured, this skill also covers initial OTLP exporter setup. Supports any platform or language.
Supported platforms: Next.js, Node.js, Python, Go, Java, Datadog, and any language via OpenTelemetry.
Follow these steps IN ORDER:
STEP 1: Analyze the codebase and detect the platform.
STEP 2: Research log capture. (Skip if PostHog log export is already configured.) 2.1. Find the reference file below that matches the detected platform โ it is the source of truth for OTLP exporter configuration and integration with existing logging. Read it now. 2.2. If no reference matches, use the "Other Languages" reference as a fallback โ it covers the generic OpenTelemetry approach.
STEP 3: Install dependencies. (Skip if PostHog log export is already configured.)
STEP 4: Configure the OTLP exporter. (Skip if PostHog log export is already configured.)
STEP 5: Integrate with existing logging.
STEP 6: Add structured properties.
STEP 7: Set up environment variables.
references/nextjs.md - Next.js logs installation - docsreferences/nodejs.md - Node.js logs installation - docsreferences/python.md - Python logs installation - docsreferences/go.md - Go logs installation - docsreferences/java.md - Java logs installation - docsreferences/datadog.md - Datadog logs installation - docsreferences/other.md - Other languages logs installation - docsreferences/start-here.md - Getting started with logs - docsreferences/search.md - Search logs - docsreferences/best-practices.md - Logging best practices - docsreferences/troubleshooting.md - Logs troubleshooting - docsreferences/link-session-replay.md - Link session replay - docsreferences/debug-logs-mcp.md - Debug logs with mcp - docsEach platform reference contains specific OTLP configuration, SDK setup, and integration patterns. Find the one matching the user's stack.