Skip to content

feat(telemetry): report daemon activity and web app opens - #769

Merged
wesm merged 10 commits into
mainfrom
pr/app-opened-event
Oct 4, 2026
Merged

wesm merged 10 commits into
mainfrom
pr/app-opened-event

Conversation

@rodboev

@rodboev rodboev commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Docbank reports when its daemon runs and when the web app opens so the team can count vaults in use. Reporting is on by default. Vault → Anonymous usage explains what is sent and how to opt out with DOCBANK_TELEMETRY_ENABLED=0 and a daemon restart.

The daemon sends daemon_started and daemon_active at startup, then daemon_active on the first hourly check of each later UTC day. Missed days during sleep are not backfilled. The web app reports app_opened about once per UTC day for the daemon's address through the authenticated daemon API. Events contain a random per-vault install ID, app version and commit, platform information, and install age; they contain no document content, filenames, paths, tags, or searches.

The PostHog reporter comes from kit’s separate package, avoiding the OpenTelemetry exporters. With identical frontend assets and stripped linux/amd64 build flags, the binary falls from 80.7 MB to 63.6 MB compared with the combined telemetry import.

The reporter uses the daemon’s slog logger, so PostHog SDK diagnostics reach the same log destination as other daemon messages. Kit is pinned to v0.31.1.

Anonymous usage note on desktop

Anonymous usage note on mobile

@roborev-ci

roborev-ci Bot commented Oct 2, 2026

Copy link
Copy Markdown

roborev: Combined Review (c8a19fe)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex, 6s | Total: 13m34s

@rodboev
rodboev force-pushed the pr/app-opened-event branch from c8a19fe to cc48d9d Compare October 2, 2026 23:03
@roborev-ci

roborev-ci Bot commented Oct 2, 2026

Copy link
Copy Markdown

roborev: Combined Review (cc48d9d)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex, 5s | Total: 10m11s

@roborev-ci

roborev-ci Bot commented Oct 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (d561b16)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex, 5s | Total: 8m48s

@wesm wesm self-assigned this Oct 3, 2026
@rodboev
rodboev marked this pull request as draft October 3, 2026 21:29
@rodboev rodboev self-assigned this Oct 3, 2026
The merged handler requires application/json and answers 413 for an
oversized body, so the tests send that content type and expect 413.
Pin kit to kenn-io/kit#148 and kit-ui to kenn-io/kit-ui#85. The reporter now
comes from kit's OpenTelemetry-free posthog package, which also owns the
install file, the daily heartbeat and the shutdown timeout. Drop the go-test
check and the 4 KB body cap; tests opt out through kit's process switch.
Docs say counts are per vault and that the heartbeat goes out at each daemon
start.
@rodboev
rodboev force-pushed the pr/app-opened-event branch from d561b16 to 6967c8d Compare October 3, 2026 22:27
@roborev-ci

roborev-ci Bot commented Oct 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (6967c8d)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex | Total: 3m39s

@rodboev
rodboev marked this pull request as ready for review October 3, 2026 22:44
wesm and others added 2 commits October 4, 2026 07:50
Give web users a visible explanation of the default-on activity reports and
how to opt out from the daemon environment. Keep the change informational
because the web app has no general daemon settings editor.

Document telemetry authentication, body-size, media-type and capture errors
so API consumers can discover the complete response contract.

Generated with Codex
Co-authored-by: Codex <noreply@openai.com>
The separate PostHog reporter is now released. Use the tag so Docbank no
longer depends on an unmerged kit commit for anonymous usage reporting.

Generated with Codex
Co-authored-by: Codex <noreply@openai.com>
@roborev-ci

roborev-ci Bot commented Oct 4, 2026

Copy link
Copy Markdown

roborev: Combined Review (1e3b3c0)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex | Total: 2m57s

Use the merged kit fixes so daily activity follows UTC calendar days when
computers sleep. Forward the daemon logger to PostHog so SDK diagnostics
reach the configured log destination.

The merge commit is pinned until kit publishes the corresponding patch
release. Update the heartbeat documentation to match its new schedule.

Generated with Codex
Co-authored-by: Codex <noreply@openai.com>
@roborev-ci

roborev-ci Bot commented Oct 4, 2026

Copy link
Copy Markdown

roborev: Combined Review (775f4d3)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex | Total: 2m41s

The UTC-day heartbeat and daemon logger support now have a tagged release.
Replace the temporary merge-commit pin with that release for a stable
review and release dependency.

Generated with Codex
Co-authored-by: Codex <noreply@openai.com>
@roborev-ci

roborev-ci Bot commented Oct 4, 2026

Copy link
Copy Markdown

roborev: Combined Review (1d5e0fc)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex | Total: 2m42s

@wesm
wesm merged commit 4dbe9e0 into main Oct 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants