History

Add anonymous PostHog telemetry for provider lifecycle events

- 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

Julius Marminge committed 8 months ago

Commit ec3778b1 parent 8c5b8d312 files · +337 −7Browse files

Showing the changes to apps/server/src/wsServer.ts (1 of 12 files). Show all

Unified · Split

apps/server/src/wsServer.ts+3−1
@@ -71,6 +71,7 @@ import { · 70 unmodified lines
7171 resolveAttachmentPathById,
7272 } from "./attachmentStore.ts";
7373 import { parseBase64DataUrl } from "./imageMime.ts";
74+import { AnalyticsService } from "./telemetry/Services/AnalyticsService.ts";
7475
7576 /**
7677 * ServerShape - Service API for server lifecycle control.
@@ -207,7 +208,8 @@ export type ServerRuntimeServices = · 130 unmodified lines
207208 | GitCore
208209 | TerminalManager
209210 | Keybindings
210− | Open;
211+ | Open
212+ | AnalyticsService;
211213
212214 export class ServerLifecycleError extends Schema.TaggedErrorClass<ServerLifecycleError>()(
213215 "ServerLifecycleError",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t