Send PostHog events and flag changes to Sazabi
Last verified on Nov 8, 2026.
PostHog records what users did. Your logs record what the system did. A drop in sign-ups after a release usually has a cause on one side and a symptom on the other, and teams end up lining up timestamps by hand across two tools.
Sazabi, the AI-native observability and security platform, accepts PostHog events as records beside your service logs. It can also let the agent query PostHog itself, so a question about a flag and a question about an error can be asked in the same thread.
What each source sends
PostHog connects four ways, and they behave differently.
- Webhook destination. PostHog's Data Pipeline posts each matching event to Sazabi as JSON. On the connected-account path Sazabi installs and maintains an HTTP Webhook destination, which PostHog calls a hog function, for each project you select, using a personal API key with
project:read,organization:readandhog_function:write. On the manual path you create it yourself and use a body with two keys,eventandperson. With no filter, every captured event is forwarded. - Browser proxy. A reverse proxy you control routes
posthog-jscapture paths/e/,/i/and/s/to Sazabi instead of PostHog, while config, flag and asset traffic still goes to PostHog. It sees only browser traffic. This is the one to choose carefully, because PostHog stops receiving that capture traffic. - MCP connector. The agent can query events and trends, browse feature flags and rollout status, review experiment results and search person and group properties. It has write access unless you connect with
--read-only. - Sandbox CLI.
posthog-cliruns in the sandbox withPOSTHOG_CLI_API_KEYandPOSTHOG_CLI_PROJECT_ID, for source map uploads and project queries.
Questions it answers
- Did errors in the API rise after a feature flag reached more users?
- Which
$pageviewpaths lost traffic in the same minutes a service started failing? - Is one experiment variant seeing more failed requests than the other?
- Which distinct IDs were active when the checkout service timed out?
- Is the event stream itself healthy, or did a destination stop delivering?
A worked example: a flag rollout and a spike in 500s
PostHog's event model gives each event an event name, a distinct_id, a timestamp and properties. Experiments rely on the $feature_flag_called event and a $feature/<flag key> property. A forwarded record, abbreviated and with fictional values, carries those fields under the event key:
{
"event": {
"event": "$feature_flag_called",
"distinct_id": "user-4821",
"timestamp": "2026-11-08T10:02:41.120Z",
"properties": {
"$feature/new-checkout": "test",
"$current_url": "https://app.example.com/checkout"
}
}
}The rollout of new-checkout went from 10% to 50% at 10
sazabi logs ask "Compare orders-service 500s before and after 10:00 with PostHog feature_flag_called events for new-checkout"The answer puts both streams on one timeline. If the 500 count steps up when flag calls do, the flag is the lead. If it does not, you can rule the rollout out in one question instead of ten minutes. Then, in a thread with the connector enabled, the agent can read the flag's rollout configuration. Because the connector can write, decide up front whether it should be allowed to roll the flag back, and connect with --read-only if the answer is no.
How it fits with other integrations
PostHog sits in observability tools next to Sentry, which carries exceptions rather than product events. Frontend telemetry from Sazabi's own SDK has its own page at Sazabi Browser SDK. Support context can come from Plain. See pricing for how volume counts.
Ways to connect
- PostHog (MCP connector): Give the Sazabi agent tools to query analytics data, feature flags, and experiment results from your PostHog organization.
Log sources
- PostHog (native log source, observability tools): Connect your PostHog account so Sazabi can install and manage a webhook destination for the projects you select.
- PostHog (manual log source, observability tools): Create an HTTP Webhook destination in PostHog's Data Pipeline pointed at your Sazabi intake URL to forward product analytics events.
- PostHog SDK (manual log source, sdks): Configure a reverse proxy to send posthog-js browser capture traffic to a Sazabi endpoint instead of PostHog.
What Sazabi detects from these logs today
These detections are on for every production project, with no monitors or alert rules to write. Sazabi opens an issue when one fires.
- Novel event: A kind of error that has never appeared before.
- Client errors: JavaScript exceptions, failed fetches and hydration errors.
Frequently Asked Questions
Do I need a paid PostHog plan?
The webhook destination goes through PostHog's Data Pipeline, which Sazabi's docs describe as a paid PostHog feature. Confirm your plan includes it before connecting.
Will PostHog still receive events if I use the browser proxy source?
No. The proxy sends the /e/, /i/ and /s/ capture paths to Sazabi instead of PostHog. To keep PostHog receiving events and also send them to Sazabi, use the webhook destination source.
Does the browser source include server-side events?
No. It covers only what posthog-js sends from the browser. Use the webhook destination source for server-side PostHog events.
Can the agent change my feature flags?
The MCP connector grants read and write access, so it can create and update flags, insights, dashboards and experiments. Add --read-only when connecting from the Sazabi CLI to restrict it to read-only tools.
Sources
- PostHog has five connection methods: native and manual log sources, a browser SDK source, an MCP connector and a sandbox CLI (accessed Nov 8, 2026)
- Sazabi installs an HTTP Webhook destination (hog function) per selected project using a personal API key with project:read, organization:read and hog_function:write (accessed Nov 8, 2026)
- The manual destination posts a JSON body with event and person keys, and an unfiltered destination forwards every captured event (accessed Nov 8, 2026)
- A reverse proxy sends posthog-js capture paths /e/, /i/ and /s/ to Sazabi instead of PostHog, covers browser traffic only, and Next.js needs skipTrailingSlashRedirect (accessed Nov 8, 2026)
- The MCP connector queries events, feature flags, experiments and person and group properties, with read and write access and a --read-only option (accessed Nov 8, 2026)
- An event has an event name, distinct_id, timestamp and properties; $feature_flag_called and the $feature/<flag key> property power experiment exposure (accessed Nov 8, 2026)