Files
zeekay 1cfa22a698 merge: upstream/main (sync, brand preserved)
# Conflicts:
#	.github/workflows/check-insights-major-version.yml
#	.github/workflows/check-posthog-major-version.yml
#	.github/workflows/ci-security.yaml
#	.github/workflows/validate-versioning.yml
#	AGENTS.md
#	AGENTS.md~upstream_main
#	packages/ai/src/otel/capture.ts
#	packages/ai/src/otel/mappers/aiSdk.ts
#	packages/ai/src/otel/mappers/index.ts
#	packages/ai/src/otel/types.ts
#	packages/core/src/__tests__/posthog.init.spec.ts
#	packages/react-native/src/PostHogProvider.tsx
#	packages/react/src/context/PostHogContext.ts
#	packages/react/src/context/PostHogProvider.tsx
#	tooling/eslint-plugin-insights/no-unsafe-web-global.js
2026-06-02 10:52:56 -07:00
..

Insights State Management Logging Examples

This is a comparison of Insights logging integrations with different state management libraries using a todo list application built with Next.js.

Examples Included

  • Redux: Uses Redux Toolkit with insightsReduxLogger middleware
  • Kea: Uses Kea with insightsKeaLogger plugin (cleaner API)

To run it

pnpm i && pnpm dev

Then visit:

Features Demonstrated

  • Action and state logging with Insights
  • Rate limiting to prevent log flooding
  • State diffing (only log changed values)
  • Action/state masking for sensitive data
  • Performance monitoring (slow action detection)
  • Different API styles (Redux-specific vs generic)

Apologies to the future traveller, the example todo app is entirely AI slop