0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 13:39:22 +01:00
posthog/rust
Oliver Browne f7eaea6b98
feat(err): parse stack traces (#25393)
Co-authored-by: David Newell <david@posthog.com>
2024-10-06 02:43:31 +03:00
..
.cargo chore(cyclotron): change columns to bytes, add blob column (#24563) 2024-08-27 12:14:26 -06:00
.sqlx feat(propdefs): slow start, sql queries (#24676) 2024-09-02 16:38:27 +03:00
bin chore: Ensure sqlx is present for migrations (#24893) 2024-09-11 12:09:29 +02:00
capture chore: Revert "fix: replay will send nonsense strings that should be captured" (#25364) 2024-10-03 13:05:09 +01:00
common feat(err): parse stack traces (#25393) 2024-10-06 02:43:31 +03:00
cyclotron-core feat(cyclotron): expose and adopt bulk job creation (#25150) 2024-09-24 10:24:32 +03:00
cyclotron-fetch feat: Cyclotron batch updates - take 2 (#25050) 2024-09-18 15:59:46 +02:00
cyclotron-janitor chore(cyclotron): modify janitor metric, expose depth limit (#25060) 2024-09-18 20:16:09 +01:00
cyclotron-node feat(cdp): Track empty cyclotron batches (#25167) 2024-09-24 09:56:16 +00:00
cymbal feat(err): parse stack traces (#25393) 2024-10-06 02:43:31 +03:00
docker/echo-server merge history 2024-06-10 14:00:00 +01:00
feature-flags feat(flags): add experience continuity (#25245) 2024-10-02 08:14:05 +00:00
hook-api fix: use jemalloc everywhere we're rusty (#24796) 2024-09-05 06:19:25 +00:00
hook-common chore(cyclotron): write to app_metrics2 CH table via kafka (#24625) 2024-09-03 07:16:04 -06:00
hook-janitor fix: use jemalloc everywhere we're rusty (#24796) 2024-09-05 06:19:25 +00:00
hook-worker fix: use jemalloc everywhere we're rusty (#24796) 2024-09-05 06:19:25 +00:00
migrations merge history 2024-06-10 14:00:00 +01:00
property-defs-rs fix(propdefs): Handle unresolvable group-type indexes properly (#25315) 2024-10-01 19:58:34 +03:00
.dockerignore merge history 2024-06-10 14:00:00 +01:00
.env chore(cyclotron): change columns to bytes, add blob column (#24563) 2024-08-27 12:14:26 -06:00
.gitignore merge history 2024-06-10 14:00:00 +01:00
Cargo.lock feat(err): parse stack traces (#25393) 2024-10-06 02:43:31 +03:00
Cargo.toml feat(err): r/error-tracking/cymbal/g (#25358) 2024-10-03 13:25:21 +03:00
depot.json chore: adjust ci for rust services, merge master 2024-06-11 16:30:21 +01:00
docker-compose.yml chore(cyclotron): publish docker images (#24537) 2024-08-23 10:27:59 +03:00
Dockerfile feat: cyclotron (#24228) 2024-08-21 12:24:56 -06:00
Dockerfile.migrate-hooks chore(cyclotron): publish docker images (#24537) 2024-08-23 10:27:59 +03:00
LICENSE merge history 2024-06-10 14:00:00 +01:00
README.md merge history 2024-06-10 14:00:00 +01:00

hog-rs

PostHog Rust service monorepo. This is not the Rust client library for PostHog.

capture

This is a rewrite of capture.py, in Rust.

Why?

Capture is very simple. It takes some JSON, checks a key in Redis, and then pushes onto Kafka. It's mostly IO bound.

We currently use far too much compute to run this service, and it could be more efficient. This effort should not take too long to complete, but should massively reduce our CPU usage - and therefore spend.

How?

I'm trying to ensure the rewrite at least vaguely resembles the Python version. This will both minimize accidental regressions, but also serve as a "rosetta stone" for engineers at PostHog who have not written Rust before.

rusty-hook

A reliable and performant webhook system for PostHog

Requirements

  1. Rust.
  2. Docker, or podman and podman-compose: To setup development stack.

Testing

  1. Start development stack:
docker compose -f docker-compose.yml up -d --wait
  1. Test:
# Note that tests require a DATABASE_URL environment variable to be set, e.g.:
# export DATABASE_URL=postgres://posthog:posthog@localhost:15432/test_database
# But there is an .env file in the project root that should be used automatically.
cargo test