- Notifications
You must be signed in to change notification settings - Fork921
Closed
Milestone
Description
This is a collection of tasks related to stabilizing our internal tracking of user activity from a workspace. Once completed, the code should ensure that there's a single place to keep track of user activity in order to reduce the chance of bugs where we forget to implement it properly for future features.
Internal APIs
- chore: add workspace_build_deadlines view #13286 - This was closed because it would require product behavior changes we don't want to do right now.
- chore: unify activity into workspaceapps.StatsCollector #13355 - This was closed because the StatsCollector interface turned out to be a poor choice for these new behaviors due to how it is currently used for both the server and proxies.
- chore: remove stats batcher and workspace usage tracker #13393 - This was originally open because I had a hypothesis this was not helping much but required a good bit of code.@johnstcn helped me by running load tests to determine these were in fact doing some heavy lifting and validated their usage.
- migrate code to dedicated workspacestats package -chore: move stat reporting into workspacestats package #13386
- move template meta last_used_at to workspacestats -chore: move template meta last_used_at to workspacestats #13415
- move Batcher and Tracker to workspacestats -chore: move Batcher and Tracker to workspacestats #13418
External APIs
Once we update how the internal APIs handle tracking of user activity we must update things like the CLI and jetbrains plugins to be compatible with the new flows. This will ensure users will continue to see accurate data from these external sources.
- Add experiment for new usage tracking behavior -chore: accept payload on workspace usage route #13544
- Modify
/usage
endpoint to accept a payload and callReportAgentStats
-chore: accept payload on workspace usage route #13544 - Update CLI commands (
coder ssh
, etc.) to periodically send a payload to/usage
-chore: switch ssh session stats based on experiment #13637 - Include an option to skip tracking -chore: switch ssh session stats based on experiment #13637
- Update coder-jetbrains plugin to periodically send payloads to
/usage
-chore: pass usage app name to coder ssh jetbrains-coder#442 - Ensure that periodic background activity does not send unwanted activity bumps -chore: use background hostname for admin tasks jetbrains-coder#446
Release Readiness
Before release we need to make sure that the new code paths are stable and ready for customers to consume. This requires testing and release documentation for how to safely upgrade.
- Scaletest new changes
- Require cli upgrade in release notes -https://www.notion.so/coderhq/Unified-Workspace-Statistics-and-Activity-Detection-11cdaf2b55bc493382ecfc302ca3d6f9?pvs=4#053b250b17244350b45e625d6b9ef23a