Skip to content

: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.

fix(property-vals): spread Kafka produces across partitions by widening the key (#59945)

Andy Zhaoa33bfafd7adb
diff --git a/rust/property-vals-rs/src/producer.rs b/rust/property-vals-rs/src/producer.rs
index 48672fd537ed..67af1106d6d6 100644
--- a/rust/property-vals-rs/src/producer.rs
+++ b/rust/property-vals-rs/src/producer.rs
@@ -87,7 +87,7 @@ impl Producer for AggregatedProducer {
let send_fut = send_keyed_iter_to_kafka(
&self.inner,
&self.output_topic,
- |m| Some(m.team_id.to_string()),
+ |m| Some(format!("{}:{}", m.team_id, m.property_key)),
messages,
);