New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async event action mapping to 5 min, add warning #3717
Conversation
message={'Webhooks and actions delayed up to 5 minutes'} | ||
className="demo-warning" | ||
description={ | ||
<>Due to temporary limitations, webhooks and actions might be delayed by up to 5 minutes.</> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will be temporary? Just Webhooks and actions might be delayed by up to 5 minutes.
should to the trick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Until we move action event mapping to the plugin server, as discussed here: PostHog/plugin-server#235
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But will action mapping in the plugin server by itself make things better? 🤔 Postgres is the bottleneck in this case and action mapping on the fly will (did?) in fact hammer it even more, because every event is a whole new request. I think what may need optimization is action mapping queries/data layout itself. Otherwise action matching without significant delays seems to be hard to pull off. Feel free to correct me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Action event mapping in the plugin server wouldn't make extra queries, that's the thing :).
Except if a) needing to fetch cohorts to see if a person belongs to them due to a filter, or b) fetching a person to match person properties in a filter. The person is more often than not already fetched, and we could inline adding the cohorts with a subquery if needed.
frontend/src/scenes/App.tsx
Outdated
@@ -117,6 +118,7 @@ export function App(): JSX.Element | null { | |||
{!sceneConfig.hideTopNav && <TopNavigation />} | |||
{scene ? ( | |||
<Layout.Content className="main-app-content" data-attr="layout-content"> | |||
{user.is_async_event_action_mapping_enabled && <AsyncActionWarning />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't suggesting always showing this, just when you are creating a webhook (and maybe when you are looking at an action).
yeah looks good |
It was broken in #3666. |
<p> | ||
Please note that webhooks and actions may be delayed up to 5 minutes due to open-source PostHog | ||
configuration. | ||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I committed this notice. I'd really like to be clear for users so that they get why there's a delay, WDYT here @mariusandra?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good enough for me
* Set ACTION_EVENT_MAPPING_INTERVAL_SECONDS to 300, move to settings * Add async warning * Use smarter get_from_env * Async event action mapping warning when creating a webhook * Async event action mapping warning when editing an action * remove top async warning * Use common reworded notice component for async mapping Co-authored-by: Michael Matloka <dev@twixes.com>
Changes
ACTION_EVENT_MAPPING_INTERVAL_SECONDS
to further specify the duration if neededChecklist