Skip to content

docs(compliance): re-audit posthog-node Traces after 5.52.0 - #63

Closed
turnipdabeets wants to merge 1 commit into
mainfrom
docs/compliance-node-traces
Closed

turnipdabeets wants to merge 1 commit into
mainfrom
docs/compliance-node-traces

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

Changes

compliance/posthog-node.md still scored Traces ❌, based on an audit at posthog-js fbdb6c7b from before tracing existed. posthog-node 5.52.0 (PostHog/posthog-js#4579) shipped startSpan/withSpan/getActiveSpan and OTLP export to /i/v1/traces. This re-audits that one row.

  • Traces: ❌ → 🟡. Audited at posthog-js 910b0925 (5.52.1) against sdk-specs 4f2f48f4. 22 of 24 requirements are met.
  • Two MUST gaps, both in "Error handling and retries":
    1. During plain backoff (a 5xx with no Retry-After), the events pipeline's automatic flush still sends spans. throttled only reads the Retry-After window. That breaks "Between retries the SDK SHALL pause automatic sends".
    2. After a batch is retired inside an open Retry-After window, flush()'s outer loop sends the next batch at the same instant. The SDK's own test pins this at index.spec.ts:3100-3126, which contradicts the scenario "dropping a batch does not end the Retry-After window".
  • Other updates in posthog-node.md: the intro sentence that claimed no Traces support in packages/node, and the header summary (now 10 ✅ · 17 🟡 · 7 ❌ · 28 ➖).
  • README.md: updated the posthog-node summary row (🟡 16→17, ❌ 8→7; open gaps stay at 24), and moved the Traces gap from the ❌ table to the 🟡 table.

Not changed:

  • The per-run narrative in README.md, which records the 2026-08-17 run's counts.
  • The posthog-js and posthog-react-native Traces rows, which say "no implementation anywhere in the monorepo". @posthog/core has the pipeline now, but browser and RN don't use it, so both stay ❌. Only the wording is stale, and it belongs in those SDKs' next re-audit.

Worth a spec decision (not scored):

  • A child started while a pass-through span is active gets recorded under the upstream id, but with the same handle as an explicit parent it's inert. The spec's "child of a pass-through is inert" rule doesn't settle which is right for the active case.
  • A handle evicted for age still returns a traceparent and parents children, although the spec says it "becomes a no-op".

How was this checked?

A per-requirement audit of packages/core/src/traces/ and packages/node/src/ against openspec/specs/traces/spec.md, citing file:line for every requirement. The two gaps were re-checked by hand against the code (index.ts:350-352, client.ts:297-317) and the spec text (lines 866-869, and the scenario at 994).

Related docs PRs for the same release: PostHog/posthog#99441, PostHog/posthog.com#20109, PostHog/context-mill#391.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QPLdjqTgK93WtVxnhx6aVr

posthog-node 5.52.0 shipped native tracing, so the Traces row moves from
Fail to Partial: 22 of 24 requirements met, with two retry-pacing gaps.

Claude-Session: https://claude.ai/code/session_01QPLdjqTgK93WtVxnhx6aVr
@turnipdabeets turnipdabeets self-assigned this Sep 11, 2026
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.

1 participant