mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
## Summary - Add `withTiming()` wrapper for server actions with Sentry span reporting and slow action warnings (>1s) - Add centralized `captureEvent()` helper for PostHog tracking - Add 5 new PostHog tracking events: optimization_reviewed, repository_connected, api_key_created, member_invited, billing_page_viewed - Instrument 4 server actions with `withTiming()`: getOrganizationMembers, getRepositoryById, getRepositoriesWithStagingEvents, getAllOptimizationEvents ## Proof of Correctness See [`js/cf-webapp/proof/08-server-action-timing.md`](js/cf-webapp/proof/08-server-action-timing.md) ## How to Verify ```bash cd js/cf-webapp bash proof/reproducers/08-server-action-timing.sh ``` 21 checks verify: withTiming utility, 4 instrumented actions, captureEvent helper, 5 tracking functions, and all tracking calls wired into action files. ## Test Plan - [ ] Run reproducer: `bash proof/reproducers/08-server-action-timing.sh` (21/21 pass) - [ ] Verify server actions still work correctly - [ ] Check Sentry for `server.action` spans after deployment
511 KiB
1512x2676px
511 KiB
1512x2676px