: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(aiobs): ai batch capture route (#62345)
Carlos Marchaldada5acf0482
diff --git a/rust/capture/src/router.rs b/rust/capture/src/router.rsindex bcd089cf3658..cbe6acd0908e 100644--- a/rust/capture/src/router.rs+++ b/rust/capture/src/router.rs@@ -218,6 +218,20 @@ pub fn router<TZ: TimeSource + Send + Sync + 'static, R: Client + Send + Sync +.get(v0_endpoint::event).options(v0_endpoint::options),)+ // `$ai_*` events: same batch handler, dedicated path so the ingress can route+ // them to the capture-ai deployment and keep AI/analytics workloads isolated.+ .route(+ "/i/v0/ai/batch",+ post(v0_endpoint::event)+ .get(v0_endpoint::event)+ .options(v0_endpoint::options),+ )+ .route(+ "/i/v0/ai/batch/",+ post(v0_endpoint::event)+ .get(v0_endpoint::event)+ .options(v0_endpoint::options),+ ).layer(DefaultBodyLimit::max(BATCH_BODY_SIZE)); // Have to use this, rather than RequestBodyLimitLayer, because we use `Bytes` in the handler (this limit applies specifically to Bytes body types)let event_router = Router::new()