Skip to content

docs(tracing): route Python to the posthog span API - #399

Merged
gewenyu99 merged 2 commits into
mainfrom
docs/python-tracing-skill
Sep 18, 2026
Merged

gewenyu99 merged 2 commits into
mainfrom
docs/python-tracing-skill

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Changes

posthog for Python gains a native span API in PostHog/posthog-python#957. The tracing skill (#391) told agents only posthog-node could send spans without OpenTelemetry, so a Python install would always add an OTel exporter pipeline.

  • Choose the capture path – new Python bullet: posthog >= 7.58.0, the traces option on the synchronous Posthog client (or posthog.traces), with posthog.start_span(...). AsyncPosthog has no span API, so it stays on OpenTelemetry.
  • Key principles – Python names alongside the Node ones for the service name (traces["service_name"]), scrubbing (before_span_send), and the person/session join (new_context() with identify_context() / set_context_session(), or the Django contexts middleware).

The tracing-python variant already exists and reads /docs/distributed-tracing/installation/python.md, which PostHog/posthog.com#20285 rewrites for the new route. Merge after the SDK release and #20285.

scripts/lib/tests/tracing-skills.test.js passes locally.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a wizard branch:

  • /wizard-ci all wizard:my-branch

Add wizard:<branch> to any command above to pin the wizard branch. It defaults to main.

Results will be posted here when complete.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@turnipdabeets
turnipdabeets marked this pull request as ready for review September 18, 2026 14:14
@turnipdabeets
turnipdabeets requested a review from a team as a code owner September 18, 2026 14:14
@turnipdabeets
turnipdabeets requested a review from a team September 18, 2026 14:22
@gewenyu99
gewenyu99 merged commit 6a65bd2 into main Sep 18, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants