stuntman / providers / product events

Product events

The analytics your app sends, kept per user and checked against a tracking plan.

Stands in for

  • PostHog
  • Segment
  • Mixpanel
  • GA4 Measurement Protocol

Everything Product events gives you

  1. 01

    Four SDKs, unchanged

    PostHog capture, batch, e, decide and flags; Segment track, identify, page, screen, group, alias and batch; Mixpanel track, import, engage; GA4.

  2. 02

    Bodies as SDKs send them

    JSON, gzip or form-encoded bodies are all read, so the app's real SDK is used as is.

  3. 03

    Events per user

    Every event with its user and properties; event_people lists the users events arrived for, with counts.

  4. 04

    Tracking plans

    A plan lists the events a flow must send and the properties each needs, as {event, props, min}.

  5. 05

    Fail CI on gaps

    check_events answers ok: false with the missing events and properties, so a test run can fail on it.

  6. 06

    Personal data flagged

    E-mail addresses, CPFs and card numbers found in properties are flagged on the event, before they reach a real tool.

  7. 07

    Wait for an event

    wait_for_event returns the event once the app sends it, optionally with a property value.

  8. 08

    A collector that fails

    The next answers are 400, 413, 429 with Retry-After, slow, or half the events silently lost.

The screens

Each number is a control or a reading on the real screen. Everything you can click there, your agent can do with a tool.

A plan, checked against what arrived

A plan, checked against what arrived: the Product events screen in Stuntman
1Per source

PostHog, Segment, Mixpanel and GA4, each with the calls it accepts and its count.

1 of 4
2SDK hosts

Point each SDK at its path on :8025; nothing else in the app changes.

2 of 4
3Missing property

workspace_created arrived without plan, which the plan requires.

3 of 4
4Missing event

trial_started never arrived: check_events answers ok: false.

4 of 4
  1. Per source

    PostHog, Segment, Mixpanel and GA4, each with the calls it accepts and its count.

  2. SDK hosts

    Point each SDK at its path on :8025; nothing else in the app changes.

  3. Missing property

    workspace_created arrived without plan, which the plan requires.

  4. Missing event

    trial_started never arrived: check_events answers ok: false.

Writing a plan

Writing a plan: the Product events screen in Stuntman
1Plans

One plan per flow, such as signup and invite.

1 of 4
24 of 7 arrived

How much of the plan the app really sent in the window.

2 of 4
3One event a line

Properties after a colon; the same plan works from set_event_plan.

3 of 4
4Save the plan

Saved in events/plans.yaml, so tests and CI read the same plan.

4 of 4
  1. Plans

    One plan per flow, such as signup and invite.

  2. 4 of 7 arrived

    How much of the plan the app really sent in the window.

  3. One event a line

    Properties after a colon; the same plan works from set_event_plan.

  4. Save the plan

    Saved in events/plans.yaml, so tests and CI read the same plan.

Break it on purpose

The failures you need to test, exactly when you ask: from the screen or by a tool call, each one shown on the timeline with who caused it.

  • Bad request

    The collector answers 400

    force_events_failure 400
  • Payload too large

    The collector answers 413

    force_events_failure 413
  • Rate limited

    429 with Retry-After

    force_events_failure 429
  • Slow collector

    Each answer takes 3 s

    force_events_failure slow
  • Half lost

    Half the events dropped, 200 anyway

    force_events_failure drop_half

Why not the real sandbox

Your AI agent drives it

Claude Code, Codex or any MCP client connects to /mcp (or calls /api over plain HTTP), sets the stand-in up, breaks it on cue and reads what your app did.

you

Run the signup flow and tell me which tracking events are missing.

set_event_plan{"name": "signup", "events": ["signup_completed", {"event": "workspace_created", "props": ["plan"]}]}
wait_for_event{"name": "signup_completed", "timeout": "60s"}
→ ok signup_completed · user emma.carter@example.com · PostHog
check_events{"plan": "signup", "within": "10m"}
→ ok: false missing: ["workspace_created"]

MCP tools

  • list_product_eventsEvents, newest first, with user, properties and personal data
  • event_peopleThe users events arrived for
  • wait_for_eventWait until the app sends an event
  • check_eventsCompare what arrived with a plan
  • list_event_plansThe plans and their events
  • set_event_planAdd or replace a plan
  • delete_event_planRemove a plan
  • force_events_failureMake the collector's next answers fail

The same over HTTP

  • GET/api/events
  • GET/api/events/wait
  • POST/api/events/check
  • PUT/api/events/plans
  • POST/api/events/force