fix(posthog): disable feature flags, remove plugin_loaded event for billing optimization

- Remove plugin_loaded telemetry from index.ts (was 46.5% of all events, ~2.83M/month)
- Add enableLocalEvaluation: false to prevent feature flag polling/decide calls
- Add strictLocalEvaluation: true to prevent server fallback requests
- Add disableRemoteConfig: true to prevent remote config network requests
- Remove 'plugin_loaded' from PostHogActivityReason type
- Update tests: remove stale mocks, add SDK options verification test
- enableExceptionAutocapture: false already present (kept)

Estimated billing reduction: ~$960+/month from feature flag requests,
plus ~2.83M fewer events/month from plugin_loaded removal.
This commit is contained in:
YeonGyu-Kim
2026-05-07 16:44:05 +09:00
parent 10f9559ccc
commit 8586cb8965
5 changed files with 45 additions and 26 deletions
-2
View File
@@ -39,8 +39,6 @@ describe("runCliInstaller telemetry isolation", () => {
mock.module("../shared/posthog", () => ({
createCliPostHog: mock(() => ({
trackActive: mock(() => {}),
capture: mock(() => {}),
captureException: mock(() => {}),
shutdown: mock(async () => {
throw new Error("shutdown failed")
}),