:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
[workspace]
resolver = "2"
members = [
"property-defs-rs",
"batch-import-worker",
"capture",
"capture-load-gen",
"capture-logs",
"capture-apm-metrics",
"cohort-core",
"cohort-event-shuffler",
"cohort-seeder",
"cohort-stream-processor",
"common/alloc",
"common/assignment-coordination",
"common/cohort-team-access",
"common/k8s-awareness",
"common/keyed-stash",
"common/cache",
"common/cookieless",
"common/database",
"common/dns",
"common/grpc",
"common/health",
"common/kafka",
"common/kafka-consumer",
"common/liveness",
"common/lifecycle",
"common/limiters",
"common/metrics",
"common/posthog",
"common/profiler",
"common/continuous_profiling",
"common/redis",
"common/s3",
"common/serve_metrics",
"common/symbol_data",
"common/temporal",
"common/types",
"common/compression",
"common/hypercache",
"common/sqlx-macros",
"feature-flags",
"flags-consumer",
"hypercache-server",
"replay-anonymizer",
"replay-anonymizer-node",
"cymbal",
"cymbal-proto",
"usage-ingestion-proto",
"usage-ingestion",
"embedding-worker",
"common/geoip",
"common/hogvm",
"common/ingestion_warnings",
"deltalite/core",
"deltalite/python",
"hogql/parser",
"kafka-assigner",
"kafka-assigner-proto",
"ingestion-consumer",
"ingestion-framework",
"logs-ingestion",
"ingestion-control-plane",
"ingestion-worker-proto",
"kafka-deduplicator",
"personhog-changelog-relay",
"personhog-common",
"personhog-coordination",
"personhog-identity",
"personhog-leader",
"personhog-parity-monitor",
"personhog-writer",
"personhog-proto",
"prometheus-rw-proto",
"personhog-replica",
"personhog-router",
"personhog-stateright",
"personhog-test-harness",
"affected-services",
"property-vals-rs",
"pgcollector",
"pgapi",
"ai-research/replay-core-v4",
"ai-research/replay-core-v4-node",
"ai-research/replay-recorder-v4",
]
# NOTE: cargo allows only one crate with `links = "python"` (i.e. one pyo3 version) per
# dependency graph. `hogql/parser` and `deltalite/python` must therefore agree on their
# pyo3 major (currently 0.28, dictated by arrow 58's `pyarrow` feature in deltalite) --
# bumping pyo3 in one means bumping it in the other, or the workspace stops resolving.
[workspace.lints.rust]
# See https://doc.rust-lang.org/stable/rustc/lints/listing/allowed-by-default.html
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }
unstable_features = "forbid"
macro_use_extern_crate = "forbid"
let_underscore_drop = "deny"
non_ascii_idents = "deny"
trivial_casts = "deny"
trivial_numeric_casts = "deny"
unit_bindings = "deny"
[workspace.lints.clippy]
# See https://rust-lang.github.io/rust-clippy/, we might want to add more
enum_glob_use = "deny"
# Inert for every crate that ships no `clippy.toml` `disallowed-methods` list (all of them but
# `cohort-stream-processor`, whose list confines async code to the `StoreHandle` facade).
disallowed_methods = "deny"
# this is needed until getsentry/symbolic update the js-source-scopes to >0.6.0
# I made a PR for the upstream fix here https://github.com/getsentry/symbolic/pull/945
[patch.crates-io]
js-source-scopes = { git = "https://github.com/getsentry/js-source-scopes", rev = "abea51a0e74840a8d1ec96a61ff36b488994f68c" }
# Emit DWARF line tables in release builds so backtrace-rs can resolve frame
# symbols for continuous profiling (pyroscope). Without this, release binaries
# on Linux expose raw _ZN…E names in the pyroscope UI because gimli-symbolize
# has no debug info to read from. line-tables-only is the cheapest level that
# still gives usable function names + file:line info at sample time; expect
# roughly 5–15% binary size increase on Linux. Debug info must stay embedded
# (no split-debuginfo) since backtrace-rs reads it at runtime.
[profile.release]
debug = "line-tables-only"
# Neon 1.1 deletes each napi async work inside `debug_assert_eq!` (src/sys/async_work.rs), so a
# release build without debug assertions leaks every `cx.task()`, with the two V8 global handles
# that hold its resource object and async context frame.
[profile.release.package.neon]
debug-assertions = true
# Dependency debug info doubles the size of a dev target dir.
[profile.dev]
debug = "line-tables-only"
[profile.dev.package."*"]
debug = false
# Cargo strips proc-macro dylibs when debug is off, and dyld rejects them after Apple ld-27106 links them.
strip = false
# The stateright model checker exhaustively explores millions of protocol
# states; its hot loop (state hashing, BTreeMap clones) is ~11x slower
# unoptimized, which would put the exhaustive tests at ~25 minutes in
# debug-profile CI runs instead of ~2. Compile the checker and the model
# crate with release-grade codegen even in dev builds — this changes
# nothing about behavior (debug assertions and overflow checks stay on),
# only how hard LLVM optimizes these two packages.
[profile.dev.package.personhog-stateright]
opt-level = 3
[profile.dev.package.stateright]
opt-level = 3
# The model's rebalance action runs the production placement computation
# (plan_partial_rebalance, the sticky strategy, the handoff diff) in every
# explored state, so the crates that host it need the same treatment or
# the checker's hot loop drops back to opt-level 0.
[profile.dev.package.personhog-coordination]
opt-level = 3
[profile.dev.package.assignment-coordination]
opt-level = 3
[workspace.dependencies]
aho-corasick = "1.1"
anyhow = "1.0"
arc-swap = "1.7"
assert-json-diff = "2.0.2"
async-compression = { version = "0.4", features = [
"tokio",
"gzip",
"deflate",
"zlib",
"brotli",
"zstd",
] }
async-stream = "0.3"
async-trait = "0.1.74"
axum = { version = "0.7.5", features = ["http2", "macros", "matched-path"] }
axum-client-ip = "0.6.0"
base64 = "0.22.0"
bytes = "1"
clap = { version = "4", features = ["derive"] }
chrono = { version = "0.4.44", features = ["default", "serde"] }
chrono-tz = "0.10.1"
dashmap = "6.1"
envconfig = "0.10.0"
flate2 = "1.0"
futures = { version = "0.3.29" }
futures-timer = "3.0"
futures-util = { version = "0.3.31" }
governor = { version = "0.5.1", features = ["dashmap"] }
hdrhistogram = "7.5"
http = { version = "1.1.0" }
humantime = "2.1"
http-body = "1.0"
http-body-util = "0.1"
httpmock = "0.7.0"
mockito = "1"
hyper = { version = "1.9.0", features = ["server", "http1", "http2"] }
# default-features off on purpose: the defaults drag in native-tokio (rustls-native-certs), and the
# `clickhouse` crate already pins this dependency with defaults off. Enabling them here would flip
# the feature set for every consumer of the shared dependency.
hyper-rustls = { version = "0.27.7", default-features = false, features = ["aws-lc-rs", "http1", "tls12"] }
hyper-util = { version = "0.1.20", features = ["server", "server-graceful", "tokio", "http1", "http2"] }
itoa = "1.0.15"
libdeflater = "1"
metrics = "0.22.0"
metrics-exporter-prometheus = "0.14.0"
metrics-util = "0.16.0"
once_cell = "1.21.4"
opentelemetry = { version = "0.22.0", features = ["trace"] }
opentelemetry-otlp = "0.15.0"
opentelemetry_sdk = { version = "0.22.1", features = ["trace", "rt-tokio"] }
percent-encoding = "2.3.1"
prost = "0.13"
public-suffix = "0.1.2"
rand = "0.8.5"
rdkafka = { version = "0.37.0", features = ["tracing", "ssl-vendored"] }
reqwest = { version = "0.12.3", features = ["json", "stream"] }
# Matches the provider `clickhouse`'s `rustls-tls` feature selects, so a direct `rustls::ClientConfig`
# is built against the same crypto backend the crate would have used itself.
rustls = { version = "0.23", default-features = false, features = ["aws_lc_rs", "std", "tls12"] }
serde = { version = "1.0", features = ["derive"] }
serde_derive = { version = "1.0" }
serde_json = { version = "1.0" }
serde_urlencoded = "0.7.1"
siphasher = "1.0.1"
snap = "1"
sqlx = { version = "0.8.6", features = [
"chrono",
"json",
"migrate",
"postgres",
"runtime-tokio",
"tls-native-tls",
"uuid",
] }
time = { version = "0.3.36", features = [
"formatting",
"macros",
"parsing",
"serde",
] }
thiserror = { version = "2.0" }
tokio = { version = "1.51.1", features = ["full"] }
tokio-util = { version = "0.7", features = ["time"] }
tower = { version = "0.4.13", features = ["limit", "timeout", "util"] }
tower-http = { version = "0.5.2", features = ["cors", "decompression-br", "decompression-deflate", "decompression-gzip", "decompression-zstd", "limit", "trace"] }
tracing = "0.1.44"
tracing-opentelemetry = "0.23.0"
tracing-subscriber = { version = "0.3.23", features = ["env-filter", "json"] }
url = "2.5.0"
uuid = { version = "1.23.0", features = ["v4", "v5", "v7", "serde"] }
proc-macro2 = "1"
quote = "1"
syn = { version = "2", features = ["full"] }
zstd = "0.13"
neon = "1"
quick_cache = "0.6.21"
ahash = "0.8.11"
aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
aws-sdk-s3 = "1.58.0"
aws-sdk-dynamodb = "1.55.0"
aws-sdk-kms = "1"
aws-smithy-runtime-api = { version = "1.11.5", features = ["client"] }
aws-smithy-http-client = { version = "1.1.11", features = ["rustls-aws-lc"] }
mockall = "0.13.0"
moka = { version = "0.12.15", features = ["sync", "future"] }
posthog-rs = { version = "0.31.1", features = ["async-client", "capture-v1"] }
redis = { version = "0.32.7", features = [
"tokio-comp",
"cluster",
"cluster-async",
"tls-rustls",
"tls-rustls-webpki-roots",
"tokio-rustls-comp",
] }
regex = "1.11.1"
fancy-regex = "0.17"
lz-str = "0.2.1"
lz4 = "1.28"
opentelemetry-proto = { version = "0.29.0", features = ["with-serde"] }
# gzip enables request decompression via accept_compressed. Response
# compression stays with personhog-common's AsyncGzipLayer — never call
# send_compressed: tonic's response-encoding negotiation matches any
# compiled-in feature once the send set is non-empty, so a single
# send_compressed(x) server would silently compress with whatever encoding
# feature unification drags in.
tonic = { version = "0.12.3", features = ["gzip"] }
tonic-build = "0.12"
clickhouse = { version = "0.13.2", features = [
"uuid",
"time",
"inserter",
"rustls-tls",
] }
# Used for decrypting django encrypted fields
fernet = "0.2"
tiktoken-rs = "0.7.0"
sha2 = "0.10"
sha1 = "0.10"
hmac = "0.12"
testcontainers = "0.27.2"