: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.
Rust crates
Metrics labels
When emitting metrics via the metrics crate (histogram!, counter!, gauge!), dynamic label values (method names, client names, etc.) must use Arc<str>, never String or .to_string().
- Construct an
Arc<str>once at the top of the function (Arc::from(value)) and.clone()it into each macro call.Arc::cloneis a single atomic increment — no heap allocation. current_client_name()already returnsArc<str>, so use.clone()directly. Never call.to_string()on it.- When passing a dynamic label through multiple functions, pass
Arc<str>by value, not&str— the downstream function will need to clone it into macros anyway. - Static label values (
"ok","error","unavailable") can be passed as&'static strliterals directly.
personhog
- A change to the publish outbox contract between
personhog-identityandpersonhog-publisherlands in the publisher first, in its own PR, and in identity in a later PR. The two are separate deployments with no ordering between them. The contract (the outbox row shapes, thelifecycle_op_person.movedentries, the pointer cursor, the GC guard) is listed under "Publish outbox contract" in personhog-identity/README.md. Read it before you changerust/personhog-identity/src/publish/, the outbox writers insrc/lifecycle/andsrc/storage/, or a persons migration that touches the outbox orlifecycle_op_person.
Container images
A pull request builds no Rust image unless it carries a smoke_test:<image> label (one image) or smoke_test (all images).
ci-rust.yml compiles every affected crate, so a code change needs no image build.
Add a label when the change can break the image build but not cargo build: a new binary or image entry, a build.rs or system dependency change, a new workspace crate, or a Dockerfile edit.
Add one too when the PR needs a deployable image.
Master builds and deploys after merge, and a broken image stops that deploy.
Out-of-band interaction domains
Call common_dns::oob_domains::note_oob_domain(host, "<guard>", team_id) before a crate resolves or dials a host that a customer supplied.
Pass Some(team_id) when the caller knows the project, and None when it does not, such as in shared infrastructure.
OOB_DOMAINS in common/dns/src/oob_domains.rs mirrors posthog/security/crosslang/oob_domains.json, so edit the json first and the mirror second.
The parity test in common-dns fails while the two differ.