Skip to content

Combine daily PostHog summaries into one daily_summary event - #1459

Open
grohith327 wants to merge 2 commits into
mainfrom
rohith/posthog-event-reduction-2c8da6
Open

grohith327 wants to merge 2 commits into
mainfrom
rohith/posthog-event-reduction-2c8da6

Conversation

@grohith327

@grohith327 grohith327 commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Cuts PostHog volume by sending one daily_summary event per active day instead of usage_daily_summary, model_usage_daily_summary (one per model), insertion_latency_daily_summary (one per path/outcome) and active_user. Model and latency rows move into model_usage / insertion_latency array properties, with flat transcription_models / ai_models lists for regular PostHog filters. model_download_started is dropped; model_download_finished already has outcome and duration.

The event timestamp is noon on the activity day, so DAU/retention can be built on it. Activity-only summaries (including all summaries when detailed analytics is off) keep the weekly hold; opting out strips details from queued summaries.

Expected effect: roughly 1.06M → 450K events/month based on the last 30 days.

Type of Change

  • 🐞 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 🧹 Chore
  • 📝 Documentation update

Related Issue or Discussion

Closes #1458

Testing

Updated AnalyticsDatabaseTests for the combined event, weekly hold, opt-out stripping and download dedupe. Not verified against live PostHog ingestion.

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version: 27.3
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources Tests Package.swift
  • Ran formatter locally: swiftformat --config .swiftformat Sources
  • Ran tests locally: AnalyticsDatabaseTests (24 passed)

Screenshots / Video

CleanShot 2026-11-28 at 1 00 29 PM@2x

Notes

PostHog dashboards need to move from active_user and the old summary events to daily_summary (or active_user OR daily_summary while old versions are still out). Old app versions keep sending the old events until they upgrade.

Claude drafted the change; I reviewed the diff. Not tested on Intel.

  • A human created this PR or reviewed and approved it before submission, understands the full diff, and takes responsibility for the change.

Usage, model usage, insertion latency and the daily activity signal now ship
as one event per active day, and model_download_started is dropped since
model_download_finished already carries outcome and duration.

Co-authored-by: Rohith Gandhi G <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-02T20:42:31.374661Z 0234b81 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the needs screenshots Pull request needs screenshot or video evidence. label Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

The PR Policy check is blocking this PR because required template information is missing.

Please update the PR description with:

  • Screenshots / Video

Visual files detected:

  • Sources/Fluid/UI/AnalyticsPrivacyView.swift

Screenshots or video are required for UI, UX, settings, onboarding, overlay, menu bar, or visual behavior changes. If this PR has no visual changes, check the no-visual-change box in the template.

If this remains incomplete for 48 hours after opening, the PR may be closed.

@github-actions github-actions Bot removed the needs screenshots Pull request needs screenshot or video evidence. label Dec 1, 2026
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge.

Summary

Combines daily activity, usage, model, and insertion totals into daily_summary.

  • Each active day is summarized in one event with its available totals.
  • Model downloads report their result without a separate start event.

Reviews (2) · Last reviewed commit: "Send late totals for a day that was alre..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

FluidVoice PR build ready

Download FluidVoice-PR-1459-0234b81a4415

The artifact contains the ad-hoc-signed app ZIP, Xcode archive, build manifest, and installation instructions. It expires 5 days after the build.

Install the app

  1. Extract the downloaded artifact, then extract FluidVoice-PR-1459.app.zip.

  2. Move FluidVoice Combine daily PostHog summaries into one daily_summary event #1459.app into the /Applications folder.

  3. Open Terminal and remove the download quarantine marker:

    xattr -dr com.apple.quarantine "/Applications/FluidVoice #1459.app"
    
  4. In Applications, Control-click FluidVoice Combine daily PostHog summaries into one daily_summary event #1459.app and choose Open.

  5. If macOS still blocks it, open System Settings → Privacy & Security, click Open Anyway, and confirm.

This build has its own app identity, so its permissions are separate from the release version of FluidVoice.

View workflow run

If the clock moves back to a summarized day, its new usage totals were
deleted without being sent. They now go out in a second summary for that
day; repeat activity alone still doesn't.

Co-authored-by: Rohith Gandhi G <[email protected]>
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.

Reduce PostHog event volume from daily summaries

1 participant