logs-nextjs▌
PostHog/skills · updated Apr 10, 2026
### PostHog Logging for Next.js
- ›Integrate PostHog log ingestion into Next.js applications using the OpenTelemetry protocol and OTLP exporters.
- ›Utilize environment variables for all PostHog keys and endpoints to ensure security and avoid hardcoding sensitive data.
- ›Implement structured logging with key-value properties and initialize via instrumentation.ts for optimal framework compatibility.
PostHog logs for Next.js
This skill helps you add PostHog log ingestion to Next.js applications.
Reference files
references/nextjs.md- Next.js 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 - docs
Consult the documentation for API details and framework-specific patterns.
Key principles
- Environment variables: Always use environment variables for PostHog keys and OpenTelemetry endpoints. Never hardcode them.
- Minimal changes: Add log export alongside existing logging. Don't replace or restructure existing logging code.
- OpenTelemetry: PostHog logs use the OpenTelemetry protocol. Configure an OTLP exporter pointed at PostHog's ingest endpoint.
- Structured logging: Prefer structured log formats with key-value properties over plain text messages.
Framework guidelines
- For Next.js 15.3+, initialize PostHog in instrumentation-client.ts for the simplest setup
Ratings
4.7★★★★★51 reviews- ★★★★★Zara Harris· Dec 28, 2024
logs-nextjs reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Zara Martin· Dec 24, 2024
Useful defaults in logs-nextjs — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Ganesh Mohane· Dec 20, 2024
logs-nextjs has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Noah Park· Dec 20, 2024
logs-nextjs has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Tariq Singh· Nov 19, 2024
logs-nextjs has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Kaira Haddad· Nov 15, 2024
I recommend logs-nextjs for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Sakshi Patil· Nov 11, 2024
logs-nextjs reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Noah Agarwal· Nov 11, 2024
logs-nextjs reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Zara Khan· Oct 10, 2024
logs-nextjs fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Kaira Lopez· Oct 6, 2024
Keeps context tight: logs-nextjs is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 51