* feat: add libmaxminddb0 as dependency. C library will speed things up significantly
* pin libmaxminddb to 1.5 for whats available from APK
* get geolite2 db during build
* add settings for geoip2 django contrib library
* black formatting
* consistently use share director
* isort fixes
* remove GeoLite2-City.mmdb from git and add script to ./bin/start to download it if file does not exist
* remove GeoLite2-City.mmdb from git
* add doc for share directory expaining why it exists
* relative path for curl in build
* shared vs share consistency
* Update snapshots
* brotli decompress
* ..everywhere
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
Co-authored-by: neilkakkar <neilkakkar@users.noreply.github.com>
* fix(person): ensure person api params url encoded
When calling /api/persons/ we were passing in ?distinct_id=asdf as the
query string. If that distinct_id contained e.g. a + sign then it
wouldn't load the person.
Instead we parse through `toParams` which calls `encodeURIComponent`.
* add test
* chore(codespaces): add env vars for running codespaces dev
These will be used by vscode and any terminals spawned
* Use default python interpreter
* chore(codespaces): add env vars for running codespaces dev
These will be used by vscode and any terminals spawned
* Use default python interpreter
* add kafka to hosts
* fix hosts
* add to hosts on docker run
* keep python path
* wip
This is currently one of our slowest queries. The query itself is fine
but the amount of data returned is causing issues.
`error` column constitutes >80% of data stored in the column - by
removing it in the query we should see significant speedups.
pganalyze page: https://app.pganalyze.com/databases/-675880137/queries/5301003665?t=7d
* Feature Request: Remove/Change 'Managed by PostHog' tag on apps
* Only show "Global" for orgs that can install own plugins
* Use correct file
* Only show "Global" for orgs that can install own plugins
Co-authored-by: GitStart <gitstart@users.noreply.github.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
Currently, plugins are reloaded when new plugins are installed, removed,
etc (even when new teams join). This causes plugin-servers to reload all
plugin code.
This PR adds tracking for that behavior (via logs) so we can see if
incidents related to loading plugin data are correlated with not only
deploys but this.
* chore(dev): use network mode host for docker-compose services
This removes the need to add kafka to /etc/hosts.
As far as I can tell this should be fine for peoples local dev except
they will be required to reset and re-migrate ClickHouse tables as they
will be trying to pull from `kafka` instead of `localhost`.
* remove ports from redis
* Update a few more references
* fix(persons): make sure "uuid" returned in person response
We reference this in a few places but it was omitted from the response
by https://github.com/PostHog/posthog/pull/10868/files
This simply adds it back in.
Relates to the issue mentioned in Slack
[here](https://posthogusers.slack.com/archives/C01GLBKHKQT/p1658349671498709)
* only add to persons serializer, avoid changes to groups
* Update snapshots
* add uuid to group response test
Co-authored-by: hazzadous <hazzadous@users.noreply.github.com>
We were for instance calling trap at a point where it wouldn't get
called, and giving special status to some processes to run in the
foreground.
Instead we:
1. wait for any process exit
2. use it's exit code for the calling process
3. kill background processes on EXIT
* chore: remove the multi dashboard insight flag
* rename modal now flag is removed
* hook the add to dashboard modal and the new dashboard modal together, allowing user to choose whether to load the dashboard on success
* set show on success to false from insight add to dashboard modal
* wire up description
* use checkbox in form, not switch
* use buttons not checkbox
* fix(autocapture): ensure `$elements` passed to `onEvent`
Before calling `onEvent` the plugin does, amoung other things, a delete
on `event.properties` of the `$elements` associated with `$autocapture`.
This means that for instance the S3 plugin doesn't include this data in
it's dump.
We could also include other data like `elements_chain` that we also
store in `ClickHouse` but I've gone for just including `elements` for
now as `elements_chain` is derived from `elements` anyhow.
* revert .env changes, I'll do that separately
* run prettier
* update to scaffold 1.3.0
* fix lint
* chore: update scaffold to 1.3.1
* update scaffold
* chore: gauge tiles with no hash to statsd
* but not every thirty seconds, that would be silly
* remove unused variable
* no need to read settings way at the top of the file