Skip to content

feat(skills): add tracing skill family - #391

Merged
turnipdabeets merged 1 commit into
mainfrom
feat/tracing-skill
Sep 17, 2026
Merged

turnipdabeets merged 1 commit into
mainfrom
feat/tracing-skill

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

Problem

Agents working through the PostHog MCP server or the wizard have skills for logs and metrics but nothing for distributed tracing, so an agent asked to "add tracing" has no PostHog guidance at all. That gap got wider with posthog-node 5.52.0 (PostHog/posthog-js#4579), which exports spans itself with no OpenTelemetry dependency – a route an agent can't discover from generic OTel knowledge.

Changes

  • context/skills/tracing/ – a docs-only skill group mirroring logs and metrics: one variant per page under /docs/distributed-tracing/installation (nodejs, nextjs, python, go, java, dotnet, php, ruby), plus other pointing at the install index for generic OTLP. Shared docs: start-here and basics.
  • description.md – how to pick the capture path (posthog-node ≥ 5.52.0 → native traces + withSpan; existing OpenTelemetry → point the exporter at /i/v1/traces; otherwise the language's OTel SDK), where to instrument, and the rules that break traces when skipped: low-cardinality span names, traceparent propagation, the posthogDistinctId/sessionId join, flushing in serverless.
  • marketplace.yaml – a posthog-tracing plugin, same shape as posthog-metrics.
  • tracing-skills.test.js – asserts the variant set and each variant's install doc, like metrics-skills.test.js.

Every docs_urls entry returns 200 as .md today, and the Node page already carries the posthog-node route (merged in PostHog/posthog.com#19837).

Deliberately not included:

  • No cli: block – reachable through wizard skill tracing-<variant> and the MCP skill menu. A wizard tracing command like wizard metrics is a separate call.
  • No omnibus/instrument-tracing aggregate yet – easy follow-up if wanted for parity with logs/metrics.
  • No CODEOWNERS line. metrics is owned by @PostHog/apm; tracing probably belongs there too, but that team couldn't be resolved from here – happy to add it if confirmed.

How did you test this code?

  • pnpm test – passes, including the new tracing-skills.test.js.
  • pnpm build – emits nine tracing-*.zip skills, a tracing group in skill-menu.json, and a posthog-tracing marketplace plugin. Read the generated tracing-nodejs SKILL.md and its references.
  • API claims in description.md (traces.serviceName, withSpan/startSpan, beforeSpanSend, the posthogDistinctId/sessionId attributes, browser tracing_headers) checked against posthog-js main.
  • Not run through the wizard end to end.

Related drafts from the same audit: PostHog/posthog#99441 (in-app empty state), PostHog/posthog.com#20109 (tracing docs landing page).

🤖 Generated with Claude Code

https://claude.ai/code/session_01QPLdjqTgK93WtVxnhx6aVr

Adds a docs-driven tracing skill group (nodejs, nextjs, python, go, java,
dotnet, php, ruby, other/OTLP) mirroring the logs and metrics families, and
a posthog-tracing marketplace plugin. posthog-node 5.52.0 exports spans
natively, so agents get a PostHog-specific route on Node and the
OpenTelemetry route everywhere else.

Claude-Session: https://claude.ai/code/session_01QPLdjqTgK93WtVxnhx6aVr
@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.

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good; no qualifying findings. Verdict: correct.

@turnipdabeets
turnipdabeets merged commit aa2d54a into main Sep 17, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants