Skip to content

Dev servers report usage into the real PostHog project, as the developer's own identity #513

Closed

Description

@Jacksondr5

Problem

Nothing turns product analytics off, or redirects it, for a dev server. Every vp run dev in every worktree sends events to the J5 Code PostHog project with the same identifier as the developer's live install, so development and agent test runs are counted as real use and can't be separated afterwards. Over the 14 days to 2026-10-10 the project recorded 164 server boots.

It also blocks verifying a new analytics event (#510) against real PostHog: a test run would add to the real data, and its events can't be told apart from another dev server's.

Decision

Jackson, 2026-10-10:

  • A second PostHog project, "J5 Code Dev", receives dev traffic. The dev runner sends there unless T3CODE_POSTHOG_KEY is already set. Released builds keep the real project's token.
  • An optional J5CODE_TELEMETRY_TAG environment variable attaches its value to every event the server sends, as a telemetryTag property. An agent verifying an event starts its dev server with a unique tag and queries for that tag; a human tester can set a name or session label. It is unset by default, and the identifier is left alone.

Both touch upstream-owned files (scripts/dev-runner.ts, apps/server/src/telemetry/AnalyticsService.ts), so they are recorded in FORK.md. The privacy page mentions the tag, since it is text the person supplies.

Events already mixed into the real project are not cleaned up; they age out with its 14-day retention.

Activity

  1. added a commit that references this issue on Oct 10, 2026
    b495cd2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions