0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 11:17:50 +01:00
Commit Graph

15 Commits

Author SHA1 Message Date
Paul D'Ambra
bfaa511985
feat: tell clients when they should stop spamming recordings (#23793) 2024-07-22 09:44:42 +01:00
Xavier Vello
d956515939
chore(capture.py): remove the sha key code path (#21892) 2024-04-29 11:11:05 +02:00
Julian Bez
9576fab1e4
chore: Add Pyupgrade rules (#21714)
* Add Pyupgrade rules
* Set correct Python version
2024-04-25 08:22:28 +01:00
Tom Owers
5513be7731
chore: upgraded Ruff linter (#18188)
* Upgraded Ruff linter

* Formatted whole codebase with new ruff rules

* Revert import removal

* Fixed mypi issues or added ignores

* Fixed schema formatting

* Fixed hogvm failing tests

* Remove duplicate key in list
2023-10-26 12:38:15 +02:00
Paul D'Ambra
2b3a45697b
revert "feat: return 429 when recordings are quota limited (#16725)" (#16775)
Revert "feat: return 429 when recordings are quota limited (#16725)"

This reverts commit 8f3ae7515d.
2023-07-26 14:17:45 +01:00
Paul D'Ambra
8f3ae7515d
feat: return 429 when recordings are quota limited (#16725)
* feat: return 429 when recordings are quota limited

* fix

* fix

* Update query snapshots

* Update query snapshots

* limit events and recordings separately, process the full batch

* Update query snapshots

* default to one minute rate limiting

* fix tests

* Update query snapshots

* Update query snapshots

* don't 429 on events _yet_

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-26 09:02:55 +01:00
Xavier Vello
e00d7ea851
feat(capture): remove team resolution code (#14959) 2023-04-04 14:24:52 +02:00
Yakko Majuri
90f1b16285
feat(ingestion): remove postgres dependency from capture endpoint (#12802)
* add support for token field in kafka message

* formPipelineEvent

* rename pipeline files according to new order

* wip team_id and anonymize ips

* conditional handlers and tests

* some plugin server fixes

* fix capture bug

* fix

* more fixes

* fix capture tests

* pipeline update

* fix + investigate database resets

* fix import order

* testing and typing updates

* add test for capture endpoint

* testing

* python typing

* plugin server test

* functional test

* fix test

* another fix

* make sure no team ids clash in tests

* fix

* add more metrics and logs

* cache nulls

* updates

* add more metrics
2022-11-23 09:55:26 -03:00
Yakko Majuri
dbe4e936e7
feat(capture): allow overriding partition keys for the plugin server topic to use random partitioning (#12785) 2022-11-15 12:36:19 -03:00
Michael Matloka
5d2ad6c7bb
chore(deps): Update black to 22.8.0 (#11596)
* chore(deps): Update `black` to `22.8.0`

* Format
2022-09-05 14:38:54 +02:00
Eric Duong
46faa8fab2
refactor(FOSS): foss remove all ee dependencies from /posthog (#10319)
* refactor: foss move properties to /posthog

* refactor: move replication and materializtaion

* refactor: move file

* refactor: move test and journeys

* refactor: move breakdown props

* refactor: move query imports

* refactor: move more ee dependencies

* refactor: restore groupsjoinquery

* fix: errors

* refactor: no ee.clickhouse dependncies

* try import tasks

* refactor: move materialization

* refactor: change foss split for column optimizer

* run black

* fix: imports

* remove comment

* Update snapshots

* run black

* skip isort

* Update snapshots

* format

* more fixes

* refactor(FOSS): split out paths query code (#10378)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* refactor: split out paths query code

* refactor: more code splitting

* fix: types

* refactor(FOSS): Setup such that FOSS is deployable (#10352)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* fix import

* refactor: add snapshost

* subscription-import

* fix: safe import

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 17:24:03 -04:00
Harry Waye
2baddd59fb
perf(events): limit select clause when getting ingest requirements (#8381)
* perf(events): limit select clause when getting ingest requirements

Previously we were pulling in all table columns for every event posted
to the `/e/` column. We actually only need the id, such that we can
associate an event with a `Team`, and a setting which says if we should
anonymize ip addresses.

There are still other optimizations to make, and some of the code paths
do several queries to the database, but I have limited the changes here
to just the most straight forward of them.

Refers to https://github.com/PostHog/posthog/issues/8378

* Add a little comment

* Filter by team_id

* Avoid changing error messages

* Update import get_team -> get_ingest_context

* Fix typing

* fix types

* fix mocking

* fix type

* Rename InjestContext -> EventIngestContext

* Update ingestion context fetch methods

* Further rename fetch functions
2022-02-02 13:46:44 +00:00
Paolo D'Amico
a714528c3f
Exception when kafka is down (#7905) 2022-01-06 07:21:37 -06:00
Yakko Majuri
aedb28f12a
support uuid in event payloads (#7226)
* support uuid in payloads

* typing shenanigans

* add statsd metric
2021-11-29 13:12:51 +00:00
Yakko Majuri
3ec5cc0d3b
Capture Endpoint Refactor (#6230)
* WIP refactor capture endpoint + DLQ

* fix typing

* more testing

* add comments

* format

* refactor get_event into smaller modular functions

* move functions to utils

* add typing

* fixes + more tests

* add test for extract_data_from_request util

* fix typing

* remove comment

* format

* remove dlq code

* determine_team_from_request -> get_team

* extract_data_from_request -> get_data

* minor fixes

* extract get_distinct_id, parse_event

* add test

* Add dead letter queue to capture endpoint (#6311)

* Add dead letter queue to capture endpoint

This reverts commit 34e7441493.

* try except kafka produce

* format

* statsd + log for dlq produce error

* fix types

* fix

* fix

* legit fix

* ignore type

* handle now timestamp

* remove test code
2021-10-11 10:38:45 +00:00