:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(sdk-health): support posthog-kmp (#70882)
Dustin Byrne924b2dc7ac71
diff --git a/frontend/src/scenes/onboarding/shared/sdkHealth/sdkConstants.ts b/frontend/src/scenes/onboarding/shared/sdkHealth/sdkConstants.tsindex 9ae71e78400f..8ad306dc5614 100644--- a/frontend/src/scenes/onboarding/shared/sdkHealth/sdkConstants.ts+++ b/frontend/src/scenes/onboarding/shared/sdkHealth/sdkConstants.ts@@ -13,6 +13,7 @@ export const SDK_TYPE_READABLE_NAME: Record<SdkType, string> = {'posthog-go': 'Go','posthog-flutter': 'Flutter','posthog-react-native': 'React Native',+ 'posthog-kmp': 'Kotlin Multiplatform','posthog-dotnet': '.NET','posthog-elixir': 'Elixir',}@@ -66,6 +67,10 @@ export const SDK_DOCS_LINKS: Record<SdkType, { releases: string; docs: string }>releases: 'https://github.com/PostHog/posthog-js/blob/main/packages/react-native/CHANGELOG.md',docs: 'https://posthog.com/docs/libraries/react-native',},+ 'posthog-kmp': {+ releases: 'https://github.com/PostHog/posthog-kmp/releases',+ docs: 'https://github.com/PostHog/posthog-kmp',+ },'posthog-dotnet': {releases: 'https://github.com/PostHog/posthog-dotnet/releases',docs: 'https://posthog.com/docs/libraries/dotnet',diff --git a/products/growth/backend/constants.py b/products/growth/backend/constants.pyindex 76b83eb95ab0..fe38fc55ad11 100644--- a/products/growth/backend/constants.py+++ b/products/growth/backend/constants.py@@ -31,6 +31,7 @@ SdkTypes = Literal["posthog-go","posthog-flutter","posthog-react-native",+ "posthog-kmp","posthog-dotnet","posthog-elixir",]@@ -47,6 +48,7 @@ SDK_TYPES: list[SdkTypes] = ["posthog-go","posthog-flutter","posthog-react-native",+ "posthog-kmp","posthog-dotnet","posthog-elixir",]diff --git a/products/growth/backend/sdk_health.py b/products/growth/backend/sdk_health.pyindex 4a6c288e5a76..d15fb3c7f6f3 100644--- a/products/growth/backend/sdk_health.py+++ b/products/growth/backend/sdk_health.py@@ -32,6 +32,7 @@ MOBILE_SDKS: frozenset[str] = frozenset("posthog-android","posthog-flutter","posthog-react-native",+ "posthog-kmp",})@@ -63,6 +64,7 @@ SDK_READABLE_NAME: dict[str, str] = {"posthog-server": "Java","posthog-flutter": "Flutter","posthog-react-native": "React Native",+ "posthog-kmp": "Kotlin Multiplatform","posthog-dotnet": ".NET","posthog-elixir": "Elixir",}diff --git a/products/growth/backend/tests/test_sdk_health.py b/products/growth/backend/tests/test_sdk_health.pyindex 3d6d31a2e1c3..59c5bede59b6 100644--- a/products/growth/backend/tests/test_sdk_health.py+++ b/products/growth/backend/tests/test_sdk_health.py@@ -322,13 +322,22 @@ class TestAssessSdkTrafficAlerts(SimpleTestCase):# Primary (first) is fresh, so SDK not marked outdatedassert result.is_outdated is False- def test_mobile_never_gets_traffic_alerts(self):+ @parameterized.expand(+ [+ ("posthog-ios",),+ ("posthog-android",),+ ("posthog-flutter",),+ ("posthog-react-native",),+ ("posthog-kmp",),+ ]+ )+ def test_mobile_never_gets_traffic_alerts(self, sdk_type: str):# Even at high traffic, mobile SDKs shouldn't trigger traffic alerts (users don't auto-update)entries = [_entry("2.0.0", 10, days_ago=5, is_latest=True),_entry("1.0.0", 90, days_ago=200),]- result = assess_sdk("posthog-ios", "2.0.0", entries, now=NOW)+ result = assess_sdk(sdk_type, "2.0.0", entries, now=NOW)assert result is not Noneassert result.outdated_traffic_alerts == []diff --git a/products/growth/dags/github_sdk_versions.py b/products/growth/dags/github_sdk_versions.pyindex 21a0bdc402c1..9404ff77ec21 100644--- a/products/growth/dags/github_sdk_versions.py+++ b/products/growth/dags/github_sdk_versions.py@@ -32,6 +32,7 @@ SDK_FETCH_FUNCTIONS: dict[SdkTypes, Callable[[], dict[str, Any]]] = {"posthog-node": lambda: fetch_node_sdk_data(),"posthog-react-native": lambda: fetch_react_native_sdk_data(),"posthog-flutter": lambda: fetch_flutter_sdk_data(),+ "posthog-kmp": lambda: fetch_kmp_sdk_data(),"posthog-ios": lambda: fetch_ios_sdk_data(),"posthog-android": lambda: fetch_android_sdk_data(),"posthog-java": lambda: fetch_java_sdk_data(),@@ -235,6 +236,11 @@ def fetch_ios_sdk_data() -> dict[str, Any]:return fetch_sdk_data_from_releases("PostHog/posthog-ios")+def fetch_kmp_sdk_data() -> dict[str, Any]:+ """Fetch Kotlin Multiplatform SDK data from GitHub releases API"""+ return fetch_sdk_data_from_releases("PostHog/posthog-kmp", tag_prefixes=["v"])++def fetch_android_sdk_data() -> dict[str, Any]:"""Fetch Android SDK data from GitHub releases API"""return fetch_sdk_data_from_releases(diff --git a/products/growth/dags/tests/test_github_sdk_versions.py b/products/growth/dags/tests/test_github_sdk_versions.pyindex 8c3c7d6a6f47..8da12ab4beab 100644--- a/products/growth/dags/tests/test_github_sdk_versions.py+++ b/products/growth/dags/tests/test_github_sdk_versions.py@@ -13,6 +13,7 @@ from products.growth.dags.github_sdk_versions import (fetch_ios_sdk_data,fetch_java_sdk_data,fetch_java_server_sdk_data,+ fetch_kmp_sdk_data,fetch_node_sdk_data,fetch_php_sdk_data,fetch_python_sdk_data,@@ -190,6 +191,30 @@ class TestFetchFlutterSdkData(TestFetchSdkDataBase):assert not any(version.startswith("v") for version in result["releaseDates"].keys())+class TestFetchKmpSdkData(TestFetchSdkDataBase):+ @patch("posthog.egress.transport.transport.requests.request")+ def test_fetch_kmp_sdk_data_success(self, mock_get: MagicMock) -> None:+ self.setup_ok_json_mock(+ mock_get,+ [+ {+ "tag_name": "v0.0.1",+ "created_at": "2026-07-14T18:03:29Z",+ "draft": False,+ "prerelease": False,+ }+ ],+ )++ result = fetch_kmp_sdk_data()++ assert result == {+ "latestVersion": "0.0.1",+ "releaseDates": {"0.0.1": "2026-07-14T18:03:29Z"},+ }+ assert "/repos/PostHog/posthog-kmp/releases" in mock_get.call_args_list[0].args[1]++class TestFetchIosSdkData(TestFetchSdkDataBase):@patch("posthog.egress.transport.transport.requests.request")def test_fetch_ios_sdk_data_success(self, mock_get):diff --git a/products/growth/frontend/generated/api.schemas.ts b/products/growth/frontend/generated/api.schemas.tsindex b3b5f2cbcebe..8ed79e9d3c4e 100644--- a/products/growth/frontend/generated/api.schemas.ts+++ b/products/growth/frontend/generated/api.schemas.ts@@ -267,6 +267,7 @@ export const HealthEnumApi = {* * `posthog-go` - posthog-go* * `posthog-flutter` - posthog-flutter* * `posthog-react-native` - posthog-react-native+ * * `posthog-kmp` - posthog-kmp* * `posthog-dotnet` - posthog-dotnet* * `posthog-elixir` - posthog-elixir*/@@ -285,6 +286,7 @@ export const LibEnumApi = {PosthogGo: 'posthog-go',PosthogFlutter: 'posthog-flutter',PosthogReactNative: 'posthog-react-native',+ PosthogKmp: 'posthog-kmp',PosthogDotnet: 'posthog-dotnet',PosthogElixir: 'posthog-elixir',} as const@@ -363,6 +365,7 @@ export interface SdkAssessmentApi {* * `posthog-go` - posthog-go* * `posthog-flutter` - posthog-flutter* * `posthog-react-native` - posthog-react-native+ * * `posthog-kmp` - posthog-kmp* * `posthog-dotnet` - posthog-dotnet* * `posthog-elixir` - posthog-elixir */lib: LibEnumApidiff --git a/products/growth/frontend/generated/api.zod.schemas.ts b/products/growth/frontend/generated/api.zod.schemas.tsindex 44511e96776f..db90b85f57e0 100644--- a/products/growth/frontend/generated/api.zod.schemas.ts+++ b/products/growth/frontend/generated/api.zod.schemas.ts@@ -472,11 +472,12 @@ export const LibEnumApi = zod'posthog-go','posthog-flutter','posthog-react-native',+ 'posthog-kmp','posthog-dotnet','posthog-elixir',]).describe(- '\* `web` - web\n\* `posthog-ios` - posthog-ios\n\* `posthog-android` - posthog-android\n\* `posthog-java` - posthog-java\n\* `posthog-server` - posthog-server\n\* `posthog-node` - posthog-node\n\* `posthog-python` - posthog-python\n\* `posthog-php` - posthog-php\n\* `posthog-ruby` - posthog-ruby\n\* `posthog-go` - posthog-go\n\* `posthog-flutter` - posthog-flutter\n\* `posthog-react-native` - posthog-react-native\n\* `posthog-dotnet` - posthog-dotnet\n\* `posthog-elixir` - posthog-elixir'+ '\* `web` - web\n\* `posthog-ios` - posthog-ios\n\* `posthog-android` - posthog-android\n\* `posthog-java` - posthog-java\n\* `posthog-server` - posthog-server\n\* `posthog-node` - posthog-node\n\* `posthog-python` - posthog-python\n\* `posthog-php` - posthog-php\n\* `posthog-ruby` - posthog-ruby\n\* `posthog-go` - posthog-go\n\* `posthog-flutter` - posthog-flutter\n\* `posthog-react-native` - posthog-react-native\n\* `posthog-kmp` - posthog-kmp\n\* `posthog-dotnet` - posthog-dotnet\n\* `posthog-elixir` - posthog-elixir')export type LibEnumApi = zod.input<typeof LibEnumApi>@@ -557,14 +558,15 @@ export const SdkAssessmentApi = zod.object({'posthog-go','posthog-flutter','posthog-react-native',+ 'posthog-kmp','posthog-dotnet','posthog-elixir',]).describe(- '\* `web` - web\n\* `posthog-ios` - posthog-ios\n\* `posthog-android` - posthog-android\n\* `posthog-java` - posthog-java\n\* `posthog-server` - posthog-server\n\* `posthog-node` - posthog-node\n\* `posthog-python` - posthog-python\n\* `posthog-php` - posthog-php\n\* `posthog-ruby` - posthog-ruby\n\* `posthog-go` - posthog-go\n\* `posthog-flutter` - posthog-flutter\n\* `posthog-react-native` - posthog-react-native\n\* `posthog-dotnet` - posthog-dotnet\n\* `posthog-elixir` - posthog-elixir'+ '\* `web` - web\n\* `posthog-ios` - posthog-ios\n\* `posthog-android` - posthog-android\n\* `posthog-java` - posthog-java\n\* `posthog-server` - posthog-server\n\* `posthog-node` - posthog-node\n\* `posthog-python` - posthog-python\n\* `posthog-php` - posthog-php\n\* `posthog-ruby` - posthog-ruby\n\* `posthog-go` - posthog-go\n\* `posthog-flutter` - posthog-flutter\n\* `posthog-react-native` - posthog-react-native\n\* `posthog-kmp` - posthog-kmp\n\* `posthog-dotnet` - posthog-dotnet\n\* `posthog-elixir` - posthog-elixir').describe(- "SDK identifier, e.g. 'web', 'posthog-python', 'posthog-node', 'posthog-ios'.\n\n\* `web` - web\n\* `posthog-ios` - posthog-ios\n\* `posthog-android` - posthog-android\n\* `posthog-java` - posthog-java\n\* `posthog-server` - posthog-server\n\* `posthog-node` - posthog-node\n\* `posthog-python` - posthog-python\n\* `posthog-php` - posthog-php\n\* `posthog-ruby` - posthog-ruby\n\* `posthog-go` - posthog-go\n\* `posthog-flutter` - posthog-flutter\n\* `posthog-react-native` - posthog-react-native\n\* `posthog-dotnet` - posthog-dotnet\n\* `posthog-elixir` - posthog-elixir"+ "SDK identifier, e.g. 'web', 'posthog-python', 'posthog-node', 'posthog-ios'.\n\n\* `web` - web\n\* `posthog-ios` - posthog-ios\n\* `posthog-android` - posthog-android\n\* `posthog-java` - posthog-java\n\* `posthog-server` - posthog-server\n\* `posthog-node` - posthog-node\n\* `posthog-python` - posthog-python\n\* `posthog-php` - posthog-php\n\* `posthog-ruby` - posthog-ruby\n\* `posthog-go` - posthog-go\n\* `posthog-flutter` - posthog-flutter\n\* `posthog-react-native` - posthog-react-native\n\* `posthog-kmp` - posthog-kmp\n\* `posthog-dotnet` - posthog-dotnet\n\* `posthog-elixir` - posthog-elixir"),readable_name: zod.string()@@ -693,14 +695,15 @@ export const SdkHealthReportApi = zod.object({'posthog-go','posthog-flutter','posthog-react-native',+ 'posthog-kmp','posthog-dotnet','posthog-elixir',]).describe(- '\* `web` - web\n\* `posthog-ios` - posthog-ios\n\* `posthog-android` - posthog-android\n\* `posthog-java` - posthog-java\n\* `posthog-server` - posthog-server\n\* `posthog-node` - posthog-node\n\* `posthog-python` - posthog-python\n\* `posthog-php` - posthog-php\n\* `posthog-ruby` - posthog-ruby\n\* `posthog-go` - posthog-go\n\* `posthog-flutter` - posthog-flutter\n\* `posthog-react-native` - posthog-react-native\n\* `posthog-dotnet` - posthog-dotnet\n\* `posthog-elixir` - posthog-elixir'+ '\* `web` - web\n\* `posthog-ios` - posthog-ios\n\* `posthog-android` - posthog-android\n\* `posthog-java` - posthog-java\n\* `posthog-server` - posthog-server\n\* `posthog-node` - posthog-node\n\* `posthog-python` - posthog-python\n\* `posthog-php` - posthog-php\n\* `posthog-ruby` - posthog-ruby\n\* `posthog-go` - posthog-go\n\* `posthog-flutter` - posthog-flutter\n\* `posthog-react-native` - posthog-react-native\n\* `posthog-kmp` - posthog-kmp\n\* `posthog-dotnet` - posthog-dotnet\n\* `posthog-elixir` - posthog-elixir').describe(- "SDK identifier, e.g. 'web', 'posthog-python', 'posthog-node', 'posthog-ios'.\n\n\* `web` - web\n\* `posthog-ios` - posthog-ios\n\* `posthog-android` - posthog-android\n\* `posthog-java` - posthog-java\n\* `posthog-server` - posthog-server\n\* `posthog-node` - posthog-node\n\* `posthog-python` - posthog-python\n\* `posthog-php` - posthog-php\n\* `posthog-ruby` - posthog-ruby\n\* `posthog-go` - posthog-go\n\* `posthog-flutter` - posthog-flutter\n\* `posthog-react-native` - posthog-react-native\n\* `posthog-dotnet` - posthog-dotnet\n\* `posthog-elixir` - posthog-elixir"+ "SDK identifier, e.g. 'web', 'posthog-python', 'posthog-node', 'posthog-ios'.\n\n\* `web` - web\n\* `posthog-ios` - posthog-ios\n\* `posthog-android` - posthog-android\n\* `posthog-java` - posthog-java\n\* `posthog-server` - posthog-server\n\* `posthog-node` - posthog-node\n\* `posthog-python` - posthog-python\n\* `posthog-php` - posthog-php\n\* `posthog-ruby` - posthog-ruby\n\* `posthog-go` - posthog-go\n\* `posthog-flutter` - posthog-flutter\n\* `posthog-react-native` - posthog-react-native\n\* `posthog-kmp` - posthog-kmp\n\* `posthog-dotnet` - posthog-dotnet\n\* `posthog-elixir` - posthog-elixir"),readable_name: zod.string()diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 4d4e31493d2e..d5488dcfc50c 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -33091,6 +33091,7 @@ export namespace Schemas {* * `posthog-go` - posthog-go* * `posthog-flutter` - posthog-flutter* * `posthog-react-native` - posthog-react-native+ * * `posthog-kmp` - posthog-kmp* * `posthog-dotnet` - posthog-dotnet* * `posthog-elixir` - posthog-elixir*/@@ -33110,6 +33111,7 @@ export namespace Schemas {PosthogGo: 'posthog-go',PosthogFlutter: 'posthog-flutter',PosthogReactNative: 'posthog-react-native',+ PosthogKmp: 'posthog-kmp',PosthogDotnet: 'posthog-dotnet',PosthogElixir: 'posthog-elixir',} as const;@@ -54805,6 +54807,7 @@ export namespace Schemas {* * `posthog-go` - posthog-go* * `posthog-flutter` - posthog-flutter* * `posthog-react-native` - posthog-react-native+ * * `posthog-kmp` - posthog-kmp* * `posthog-dotnet` - posthog-dotnet* * `posthog-elixir` - posthog-elixir */lib: LibEnum;