Skip to content

Instantly share code, notes, and snippets.

@R4wm
Last active January 27, 2026 17:51
Show Gist options
  • Select an option

  • Save R4wm/476caab5d6fc0021744d6fc8c8bf0b9e to your computer and use it in GitHub Desktop.

Select an option

Save R4wm/476caab5d6fc0021744d6fc8c8bf0b9e to your computer and use it in GitHub Desktop.
CDP Meeting TODOs - 2026-01-27

CDP Meeting TODOs - 2026-01-27

For Raymond Mintz

  1. Send Yan the metrics endpoint and payload (explicitly requested)

    • Endpoint already exists at POST /v1/events (no /api prefix)
    • Controller: app/Http/Controllers/EventController.php
    • Returns 202 {"success": true}
  2. Increase payload size limit - Support batch events (~500KB suggested)

    • Current limit: MAX_EVENT_PAYLOAD_BYTES (default 64KB)
    • Config lives in config/kafka.php (max_event_payload_bytes)
  3. Add brand/platform field to metrics payload - Include Play TV or Parlor identifier

    • Decision: keep it in payload for now (not a header)
  4. Fix dual Kafka topic publishing - Ensure events go to both events.raw and events.views

    • Topics already configured in config/kafka.php
    • Endpoint currently does not publish; add in Phase 2
  5. Tenant ID enumeration - Parlor = 1, Play TV = 2

  6. Update field definitions doc - Sync Excel/field-definitions list with payload Kenji expects

  7. End of day status update - One-liner for overnight handoff

  8. Batching support - Accept an array of events so clients can POST batches


Sample Request (Draft)

URL: https://social-api.forte.ws/v1/events

Method: POST

Auth: Authorization: Bearer <token>

Headers:

Content-Type: application/json

Payload (single event):

{
  "event_id": "550e8400-e29b-41d4-a716-446655440000",
  "event_type": "notification.click",
  "tenant_id": 1,
  "occurred_at": "2026-01-27T15:30:00Z",
  "source": {
    "platform": "ios",
    "device_id": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
    "app_version": "2.1.0",
    "os_version": "17.2",
    "device_model": "iPhone 15 Pro",
    "screen_width": 1179,
    "screen_height": 2556
  },
  "subject": {
    "type": "notification",
    "id": "01HQXYZ123"
  },
  "context": {
    "notification_type": "new_follower",
    "action": "profile_view"
  }
}

Payload (batch):

[
  {
    "event_id": "550e8400-e29b-41d4-a716-446655440000",
    "event_type": "notification.click",
    "tenant_id": 1,
    "occurred_at": "2026-01-27T15:30:00Z",
    "source": {
      "platform": "ios",
      "device_id": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
      "app_version": "2.1.0",
      "os_version": "17.2",
      "device_model": "iPhone 15 Pro",
      "screen_width": 1179,
      "screen_height": 2556
    },
    "subject": {
      "type": "notification",
      "id": "01HQXYZ123"
    },
    "context": {
      "notification_type": "new_follower",
      "action": "profile_view"
    }
  }
]

Required fields:

  • event_id (UUID)
  • event_type (string)
  • tenant_id (1 = Parlor, 2 = Play TV)
  • source.platform (ios | android | web | tv)
  • source.device_id (string)

Response: 202 with {"success": true}


Missing / Underspecified (flag for follow-up)

  • Event envelope schema not locked - subject to change as metadata is added
  • Testing goal: Send at least one real event E2E by next meeting (even local)
  • Possible sidecar/event generator for consistency checks (added to Epic as reminder)
  • Topic strategy: Keep two Kafka topics for now; revisit if retention/priority needs arise
  • Dashboards in Superset/Clickhouse once data flows

Other Team Items

  • Yan (mobile): Prefers Parlor, start adding metrics overnight, fire-and-forget OK, experiment with Flutter SDK for network handling
  • Ron (web): Working on Play TV web client metrics
  • Device ID header on all API requests via interceptors (mobile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment