error-tracking-python

PostHog error tracking for Python.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "error-tracking-python" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-8e7600a53a9ece7ed83f4a20bdf7f186dab96a9b4f15d9b8fe46dc73fc4347b2. Verify the upstream source and version against https://skills.sh/posthog/skills/error-tracking-python before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skills.sh

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

PostHog error tracking for Python.

0 Downloads

Introduction source: third_party · posthog · 1.0.0 Reference

SkillPi interpretation

Tasks
PostHog error tracking for Python
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: error-tracking-python
description: PostHog error tracking for Python
metadata:
  author: PostHog
  version: 1.9.4

PostHog error tracking for Python

This skill helps you add PostHog error tracking to Python applications.

Reference files

  • references/python.md - Python error tracking installation - docs
  • references/fingerprints.md - Fingerprints - docs
  • references/alerts.md - Send error tracking alerts - docs
  • references/monitoring.md - Monitor and search issues - docs
  • references/assigning-issues.md - Assign issues to teammates - docs
  • references/upload-source-maps.md - Upload source maps - docs

Consult the documentation for API details and framework-specific patterns.

Key principles

  • Environment variables: Always use environment variables for PostHog keys and host URLs. Never hardcode them.
  • Minimal changes: Add error tracking alongside existing error handling. Don't replace or restructure existing error handling code.
  • Autocapture first: Enable exception autocapture in the SDK initialization before adding manual captures.
  • Source maps: Upload source maps so stack traces resolve to original source code, not minified bundles.
  • Manual capture for boundaries: Use captureException() at error boundaries and catch blocks for errors that don't propagate to the global handler.

Framework guidelines

  • Remember that source code is available in the venv/site-packages directory
  • posthog is the Python SDK package name
  • Install dependencies with pip install posthog or pip install -r requirements.txt and do NOT use unquoted version specifiers like >= directly in shell commands
  • In CLIs and scripts: MUST call posthog.shutdown() before exit or all events are lost
  • Always use the Posthog() class constructor (instance-based API) instead of module-level posthog.api_key config
  • Always include enable_exception_autocapture=True in the Posthog() constructor to automatically track exceptions
  • NEVER send PII in capture() event properties — no emails, full names, phone numbers, physical addresses, IP addresses, or user-generated content
  • PII belongs in identify() person properties, NOT in capture() event properties. Safe event properties are metadata like message_length, form_type, boolean flags.
  • Register posthog_client.shutdown with atexit.register() to ensure all events are flushed on exit
  • The Python SDK has NO identify() method — use posthog_client.set(distinct_id=user_id, properties={...}) to set person properties, or use identify_context(user_id) within a context

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 为 Python 开发者提供实用的 PostHog 错误追踪集成方案
  • 覆盖关键原则和框架特定指导,具有明确实用价值
Trigger Precision85/100

Highlights

  • 触发词精准描述核心功能,边界清晰
Structure and Standards70/100

Areas to improve

  • 缺少 When to Use/示例章节 Reported severity: Minor

    文档缺少具体的使用场景说明和端到端示例

    Recommendation: 建议补充 When to Use 章节和具体集成示例

  • 引用文件未验证存在性 Reported severity: Minor

    引用了多个参考文件但未验证是否实际存在

    Recommendation: 请确保所有引用文件都存在且内容完整

Highlights

  • frontmatter 完整,结构清晰
  • 提供了详细的关键原则和框架指南
Execution Reliability88/100

Highlights

  • 包含详细的安全最佳实践(PII 处理)
  • 提供了完整的 SDK 使用规范和注意事项
Evidence Verifiability (mean of the first four)80/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 36
  • Accounts, secrets or authorization

    Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.

    Mentioned in main document · lines 38

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.