instrument-logs

Export application logs to PostHog via OpenTelemetry OTLP with structured attributes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you capture application logs in PostHog with structured, searchable fields so you can debug issues faster and verify logging coverage after changes.

Core Features & Use Cases

  • OTLP-based PostHog log export: Adds PostHog log capture using OpenTelemetry with an OTLP exporter pointed at PostHog ingest.
  • Minimal integration with existing logging: Integrates alongside current log handlers without replacing or restructuring core logging architecture.
  • Structured properties for search: Ensures logs include key-value attributes for filtering, search, and correlation (including trace/session context where applicable).
  • Reference-driven by platform: Detects the target platform (Node.js, Python, Next.js, Go, Java, Datadog, or other OTEL-compatible) and follows the matching integration reference.

Quick Start

Add PostHog log capture to your repository using OpenTelemetry by following the detected-platform reference in this skill, then integrate a non-breaking log exporter while ensuring logs include structured attributes.

Frequently Asked Questions about instrument-logs

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

FAQPage Schema
How do I export application logs to PostHog using OpenTelemetry?

You can export application logs to PostHog using OpenTelemetry by configuring an OTLP exporter pointed at PostHog ingest. This integrates alongside your existing log handlers without replacing your core logging architecture.

Can I add structured logging to my Node.js or Python app for PostHog?

Yes, structured logging for PostHog can be added to Node.js, Python, Next.js, Go, or Java apps. The integration detects your target platform and applies the matching OpenTelemetry OTLP reference configuration.

Does PostHog log capture require replacing my current logging architecture?

No, PostHog log capture does not require replacing your current logging architecture. It integrates alongside existing log handlers as a non-breaking exporter, ensuring logs include structured key-value attributes for search.

How do I ensure my logs are searchable and correlated in PostHog?

To make logs searchable and correlated in PostHog, include structured key-value attributes in your log events. The OpenTelemetry OTLP exporter applies these properties to new and updated events, enabling filtering and trace correlation.

What environment variables do I need for OTLP log export to PostHog?

Environment variables are required for OTLP log export to PostHog to configure the exporter endpoint and authentication credentials. The integration uses environment-variable usage to establish the connection without hardcoding values.

Can I use Datadog with PostHog log capture via OpenTelemetry?

Yes, you can use Datadog alongside PostHog log capture via OpenTelemetry. The integration supports Datadog and other OTEL-compatible clients by detecting the platform and applying the matching reference configuration.