logs-other

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PostHog logs for Other Languages

适用于其他语言的PostHog日志集成

This skill helps you add PostHog log ingestion to Other Languages applications.
本技能可帮助你为其他语言的应用添加PostHog日志摄入功能。

Reference files

参考文件

  • references/other.md
    - Other languages 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.
  • references/other.md
    - 其他语言日志安装文档
  • references/start-here.md
    - 日志入门文档
  • references/search.md
    - 日志搜索文档
  • references/best-practices.md
    - 日志最佳实践文档
  • references/troubleshooting.md
    - 日志故障排查文档
  • references/link-session-replay.md
    - 会话重放关联文档
  • references/debug-logs-mcp.md
    - 使用MCP调试日志文档
如需API详情和特定框架的实现模式,请查阅相关文档。

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.
  • 环境变量:始终使用环境变量存储PostHog密钥和OpenTelemetry端点,切勿硬编码。
  • 最小改动:在现有日志功能基础上添加日志导出,不要替换或重构现有日志代码。
  • OpenTelemetry:PostHog日志采用OpenTelemetry协议。配置指向PostHog摄入端点的OTLP导出器。
  • 结构化日志:优先使用包含键值属性的结构化日志格式,而非纯文本消息。

Framework guidelines

框架指南

No specific framework guidelines.
无特定框架指南。