logs-nodejs

Export OpenTelemetry OTLP log records from Node.js to PostHog.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/FrekiManagarm/dunlo --skill logs-nodejs-frekimanagarm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logs-nodejs
Source: https://github.com/FrekiManagarm/dunlo/tree/main/.agents/skills/logs-nodejs
Command: npx skills add https://github.com/FrekiManagarm/dunlo --skill logs-nodejs-frekimanagarm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Node.js teams need a consistent way to ship application logs to PostHog so they can search, debug, and correlate incidents without manually reinventing logging pipelines.

Core Features & Use Cases

  • PostHog logs via OpenTelemetry (OTLP): Configure OTLP log exporting from Node.js to PostHog’s ingestion endpoint.
  • Production-ready logging guidance: Apply structured logging patterns (wide events), sensible log levels, and sampling strategies to keep logs useful and cost-effective.
  • Debugging support and workflow context: Use references for installation, searching logs, troubleshooting, and linking logs to session replay context.

Quick Start

Set up OpenTelemetry logs in your Node.js service and export OTLP logs to PostHog using your PostHog project token.

Frequently Asked Questions about logs-nodejs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send Node.js application logs to PostHog?

Send Node.js logs to PostHog by configuring an OpenTelemetry OTLP log exporter to forward structured log records directly to the PostHog logs ingestion endpoint. You need to set environment variables for your PostHog project token and endpoint credentials.

What is the best way to structure Node.js logs for PostHog ingestion?

The best way to structure logs for PostHog ingestion is emitting wide events with structured scalar attributes for each log event. Apply sensible log levels and sampling strategies to keep your OTLP logs useful and cost-effective for analysis.

Can I use OpenTelemetry OTLP logs with PostHog for backend error tracking?

Yes, you can use OpenTelemetry OTLP logs with PostHog for backend error tracking. Exporting OTLP log records allows you to search, debug, and correlate operational failures, retries, and request errors with trace context.

Does PostHog support session replay correlation with Node.js backend logs?

PostHog supports linking backend logs to session replay context. By exporting structured OTLP log records with trace correlation from Node.js, you can connect backend operational failures and request errors to frontend session replays.

Do I need environment variables to export OTLP logs to PostHog from Node.js?

Yes, you need environment variables to configure OTLP log exporting to PostHog. Setting environment variables for your PostHog project token and ingestion endpoint credentials is required to authenticate and route the structured log records.

Why are my PostHog Node.js logs not showing structured attributes correctly?

PostHog logs may not show structured attributes if you are not emitting structured scalar attributes for each log event. Ensure your Node.js service uses the standard OTLP log format with an OTLP exporter to maintain queryable log attributes.