* chore(diagnose): add a stub endpoint for event diagnosis
This adds an insight endpoint that takes a `target_entity` and returns
a list of events ordered by significance of a person reaching
`target_entity`
Followup PRs will add actual calculations but this should act as a
conversation piece around the structure of request and response, as well
as a stub from which UI development can start.
* play around to get mypy typings right
* Sort out test reponse structurea
* refactor: address CR comments
* feat(diagnose): add diagnose stubs for implementation
* feat(funnel): add event correlation calculation implementation
This adds to the `/api/projects/<team_id>/funnel/correlation` endpoint
an implementation that calculates the odds_ratios for each event that a
user that has been part of a funnel, successful or otherwise.
* chore(correlation): get query working
* refactor(correlation): move functions to Query methods
* fallback if property is explicitly "null" inside json
* do a bit more verification
* keep form
* fallback None -> [] in a couple places
Co-authored-by: Sam Winslow <sammywinslow@gmail.com>
* Always allow filtering on distinct id
* fix
* fix
* remove accidentally commited test
* include table name
* add table specific because distinct_id doesn't exist on person table
Co-authored-by: eric <eeoneric@gmail.com>
* make sure funnel and path dates are always aligned and add api handling for funnel filter persons
* use post instead of GET for paths
* parse label
* change type
* use post in test
* fix types
* test both get and post
* refactor insight metadata into separate reusable components
* create insightMetdataLogic
* added editable states to fields
* description add suffix to input
* fix functional bugs with input values
* remove consoles
* testing for insightMetadataLogic
* revert Insight
* revert Insight
* make editable in view mode
* test for update path
Our queries now contain a lot of comment noise that's not relevant when
developing. This change makes PRINT_SQL env variable usable again by
stripping these comments.
* adds Sentry to the window object to facilitate logging for PostHog/posthog-js#290
* inject xhr error behaviour rather than injecting Sentry - depends on PostHog/posthog-js#296
* Add expected type to onXHRError function
* more safely add Sentry to posthog config
* update setting on xhr error config to correct exported config type
* enrich sentry error after testing
* dev(clickhouse): strip out comments before executing sql
This is so we can easily copy/paste from e.g. Metabase by querying the
system.query_log. In metabase is doesn't display new lines (although you
can download to file for this), but it's not very practical.
* test(clickhouse): use `capture_select_queries` in comment strip test
* test(clickhouse): only sub. params if non-insert query
This parallels `clickhouse_driver` behaviour.
* chore(clickhouse): move sql preparation to dedicated function
* refactor: rearrange func and type definitions
* basic modal for dropoff and completed paths
* use right link for completed calculation
* fix calculations
* update Modal text
* cleanup
* rerun prettier
* Add asv code
* Get a benchmark running
* better output folder
* Move benchmark file
* Cleanup of config
* Run a query and benchmark
* Skip benchmarks for isort
* Set up materialized columns before test
* Better skipping logic
* Add first proper benchmark, add some documentation
* Person property filtering
* Add new workflow
* Show stderr in test run
* Continue debugging actions
* Try to save benchmark results to separate repo
* Output to main directory
* Scheduling
* Remove if temporarily
* Int for ms
* Comment on the PR
* Collapsible section
* Update README
* Clarification
* Remove h3
* Remove pyproject.toml, .gitignore changes that are unneeded
* Add project-nested version of all project-dependent endpoints
* Fix hook `perform_create`
* Adjust `plugin-configs` to adhere to style of other endpoints
* Test Kafka
* black format python
* fix imports
* add kafka and zk deps for testing
* Include ZK and Kafka for all tests
* fix signature for kafka helper
* Connect to localhost for kafka
* update kafka host for all test runs
* Wrong env var for kafka
* consolidate env vars for github actions
* set the advertised hostname from the broker to localhost
* add env var to docker-compose for kafka broker advert host
* resort to what we do locally with /etc/hosts
* Remove configs for kafka that won't be used
* restore progress
* working connection no UI visual
* working for events
* edit endpoint to start point
* working with close button
* funnel to path work (no dropoff yet)
* run prettier
* make suggested adjustmenst