- introduce `AnalyticsService` with buffered PostHog batch flush - add hashed telemetry identifier from Codex account id or anonymous local id - record provider session/turn lifecycle events and flush on stop-all - wire telemetry layer into server runtime and update tests with no-op analytics
Showing the changes to apps/server/src/wsServer.ts (1 of 12 files). Show all
Unified · Split
| @@ -71,6 +71,7 @@ import { · 70 unmodified lines | |||
| 71 | resolveAttachmentPathById, | 71 | resolveAttachmentPathById, |
| 72 | } from "./attachmentStore.ts"; | 72 | } from "./attachmentStore.ts"; |
| 73 | import { parseBase64DataUrl } from "./imageMime.ts"; | 73 | import { parseBase64DataUrl } from "./imageMime.ts"; |
| 74 | import { AnalyticsService } from "./telemetry/Services/AnalyticsService.ts"; | ||
| 74 | 75 | ||
| 75 | /** | 76 | /** |
| 76 | * ServerShape - Service API for server lifecycle control. | 77 | * ServerShape - Service API for server lifecycle control. |
| @@ -207,7 +208,8 @@ export type ServerRuntimeServices = · 130 unmodified lines | |||
| 207 | | GitCore | 208 | | GitCore |
| 208 | | TerminalManager | 209 | | TerminalManager |
| 209 | | Keybindings | 210 | | Keybindings |
| 210 | | Open; | 211 | | Open |
| 212 | | AnalyticsService; | ||
| 211 | 213 | ||
| 212 | export class ServerLifecycleError extends Schema.TaggedErrorClass<ServerLifecycleError>()( | 214 | export class ServerLifecycleError extends Schema.TaggedErrorClass<ServerLifecycleError>()( |
| 213 | "ServerLifecycleError", | 215 | "ServerLifecycleError", |