mcpField
L
logs-go

logs-go

github.com/posthogCloud & DevOps7690 installsUpdated today
Repository

About logs-go

A skill for developers adding PostHog log ingestion to Go applications. It covers configuring an OTLP exporter through OpenTelemetry and recommends structured logs while preserving existing logging code.

Key features

  1. 01Configure OpenTelemetry log export
  2. 02Use an OTLP exporter
  3. 03Structured logging guidance
  4. 04Set keys and endpoints with environment variables
  5. 05References for log search and troubleshooting

Use cases

  1. 01Send Go application logs to PostHog
  2. 02Add log export alongside an existing logging system
  3. 03Troubleshoot log ingestion

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/posthog/skills --skill logs-go

After installing, type/logs-goin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
best-practices.md
debug-logs-mcp.md
go.md
link-session-replay.md
search.md
start-here.md
troubleshooting.md

Details

From the project README

PostHog logs for Go

This skill helps you add PostHog log ingestion to Go applications.

Reference files

  • references/go.md - Go logs installation - docs
  • references/start-here.md - Getting started with logs - docs
  • references/search.md - Search logs - docs
  • references/best-practices.md - Logging best practices - docs
  • references/troubleshooting.md - Logs troubleshooting - docs
  • references/link-session-replay.md - Link session replay - docs
  • references/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

No specific framework guidelines.

Comments

Markdown supported