: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
fix(hobby): serve the AI capture endpoints in hobby and local dev (#120791)
Eli Reisman1d6f4d0f2b76
diff --git a/bin/mprocs.yaml b/bin/mprocs.yamlindex a9a50d949d8d..6cbcb453f342 100755--- a/bin/mprocs.yaml+++ b/bin/mprocs.yaml@@ -408,7 +408,7 @@ procs:shell: |-bin/wait-for-docker && \bin/start-rust-service capture-ai- capability: ai_capture+ capability: event_ingestionready_pattern: 'listening on *'groups:layer: Ingestion pipelinediff --git a/bin/start-rust-service b/bin/start-rust-serviceindex 558f9d97098b..d891be5e6828 100755--- a/bin/start-rust-service+++ b/bin/start-rust-service@@ -88,6 +88,8 @@ case "$RS_SVC" inexport DATABASE_URL="${DATABASE_URL:-$DEFAULT_PG}"# `ai` mode produces to the AI lane as its main topic, matching prod capture-aiexport CAPTURE_MODE=ai+ # Keep AI events under the local Kafka 1MB message limit (see docker-compose.base.yml)+ export AI_MAX_EVENT_BYTES=900000export LOG_LEVEL=debugexport DEBUG=1export DEV_RUST_SVC_OVERRIDE=capture # we want to run the same "capture" binary in a separate modediff --git a/devenv/intent-map.yaml b/devenv/intent-map.yamlindex da342387d659..4da9421a40dc 100644--- a/devenv/intent-map.yaml+++ b/devenv/intent-map.yaml@@ -99,11 +99,6 @@ capabilities:requires: [core_infra]docker_profiles: []- ai_capture:- description: 'AI event capture service'- requires: [event_ingestion, llm_gateway, personhog]- docker_profiles: []-embedding_service:description: 'Vector embedding worker for AI features'requires: [core_infra]@@ -304,7 +299,6 @@ intents:capabilities:[event_ingestion,- ai_capture,llm_gateway,embedding_service,property_definitions,diff --git a/docker-compose.base.yml b/docker-compose.base.ymlindex db7619db5e5b..6e5e0cb8971f 100644--- a/docker-compose.base.yml+++ b/docker-compose.base.yml@@ -427,6 +427,10 @@ services:# `ai` mode produces to the AI lane as its main topic (no $ai_* divert needed),# matching the production capture-ai deployment.CAPTURE_MODE: ai+ # Local Kafka keeps its default 1MB message limit, so cap AI events below it+ # to return `ai_event_too_big` instead of failing at the producer.+ AI_MAX_EVENT_BYTES: '900000'+ KAFKA_PRODUCER_MESSAGE_MAX_BYTES: '1000000'RUST_LOG: 'info,rdkafka=warn'capture-logs:diff --git a/docker-compose.dev-full.yml b/docker-compose.dev-full.ymlindex a16515bb282e..55ac195457cd 100644--- a/docker-compose.dev-full.yml+++ b/docker-compose.dev-full.yml@@ -18,6 +18,7 @@ services:depends_on:- replay-capture- capture+ - capture-ai- feature-flags- hypercache-server- web@@ -156,6 +157,16 @@ services:- redis7- kafka+ capture-ai:+ extends:+ file: docker-compose.base.yml+ service: capture-ai+ environment:+ - DEBUG=1+ depends_on:+ - redis7+ - kafka+replay-capture:extends:file: docker-compose.base.ymldiff --git a/docker-compose.hobby.yml b/docker-compose.hobby.ymlindex acefb0c1aeed..43a6cb61d42f 100644--- a/docker-compose.hobby.yml+++ b/docker-compose.hobby.yml@@ -565,6 +565,14 @@ services:service: capturelogging: *default-logging+ capture-ai:+ build:+ context: ./posthog/rust+ extends:+ file: docker-compose.base.yml+ service: capture-ai+ logging: *default-logging+capture-logs:build:context: ./posthog/rust