: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
feat(rust): upgrade posthog-rs (common + dependent services) from 0.12.0 to 0.13.3 + capture-v1 (#65681)
Eli Reismand0a2e89ec5eb
diff --git a/rust/Cargo.lock b/rust/Cargo.lockindex 565791be0629..30591c24c333 100644--- a/rust/Cargo.lock+++ b/rust/Cargo.lock@@ -1308,7 +1308,7 @@ dependencies = ["mockito","moka","natord",- "posthog-rs 0.13.3",+ "posthog-rs","rayon","rdkafka","reqwest 0.12.28",@@ -2206,7 +2206,7 @@ version = "3.1.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34"dependencies = [- "windows-sys 0.61.2",+ "windows-sys 0.48.0",][[package]]@@ -2379,7 +2379,7 @@ dependencies = [name = "common-posthog"version = "0.1.0"dependencies = [- "posthog-rs 0.12.0",+ "posthog-rs","serde_json","tokio","tracing",@@ -2820,7 +2820,7 @@ dependencies = ["mockall","moka","personhog-common",- "posthog-rs 0.12.0",+ "posthog-rs","posthog-symbol-data","proguard","rand 0.8.5",@@ -3438,7 +3438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"dependencies = ["libc",- "windows-sys 0.61.2",+ "windows-sys 0.59.0",][[package]]@@ -4775,7 +4775,7 @@ dependencies = ["libc","percent-encoding","pin-project-lite",- "socket2 0.6.3",+ "socket2 0.5.10","system-configuration 0.7.0","tokio","tower-service",@@ -5181,7 +5181,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"dependencies = ["hermit-abi","libc",- "windows-sys 0.61.2",+ "windows-sys 0.59.0",][[package]]@@ -6471,7 +6471,7 @@ version = "0.50.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"dependencies = [- "windows-sys 0.61.2",+ "windows-sys 0.59.0",][[package]]@@ -7669,28 +7669,6 @@ dependencies = ["portable-atomic",]-[[package]]-name = "posthog-rs"-version = "0.12.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "24e1beb349e47c45a4ffdee65e8c096ff0022c0a4d6c566cacdf50f553427fb3"-dependencies = [- "backtrace",- "chrono",- "derive_builder",- "flate2",- "os_info",- "regex",- "reqwest 0.13.4",- "semver",- "serde",- "serde_json",- "sha1",- "tokio",- "tracing",- "uuid",-]-[[package]]name = "posthog-rs"version = "0.13.3"@@ -8402,7 +8380,7 @@ dependencies = ["quinn-udp","rustc-hash 2.1.1","rustls 0.23.37",- "socket2 0.6.3",+ "socket2 0.5.10","thiserror 2.0.18","tokio","tracing",@@ -8440,9 +8418,9 @@ dependencies = ["cfg_aliases","libc","once_cell",- "socket2 0.6.3",+ "socket2 0.5.10","tracing",- "windows-sys 0.60.2",+ "windows-sys 0.59.0",][[package]]@@ -9103,7 +9081,7 @@ dependencies = ["errno","libc","linux-raw-sys 0.12.1",- "windows-sys 0.61.2",+ "windows-sys 0.59.0",][[package]]@@ -9205,7 +9183,7 @@ dependencies = ["security-framework 3.7.0","security-framework-sys","webpki-root-certs",- "windows-sys 0.61.2",+ "windows-sys 0.59.0",][[package]]@@ -10667,7 +10645,7 @@ dependencies = ["getrandom 0.4.1","once_cell","rustix 1.1.4",- "windows-sys 0.61.2",+ "windows-sys 0.59.0",][[package]]@@ -11957,7 +11935,7 @@ version = "0.1.11"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"dependencies = [- "windows-sys 0.61.2",+ "windows-sys 0.48.0",][[package]]@@ -12063,15 +12041,6 @@ dependencies = ["windows-targets 0.52.6",]-[[package]]-name = "windows-sys"-version = "0.60.2"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"-dependencies = [- "windows-targets 0.53.5",-]-[[package]]name = "windows-sys"version = "0.61.2"@@ -12105,30 +12074,13 @@ dependencies = ["windows_aarch64_gnullvm 0.52.6","windows_aarch64_msvc 0.52.6","windows_i686_gnu 0.52.6",- "windows_i686_gnullvm 0.52.6",+ "windows_i686_gnullvm","windows_i686_msvc 0.52.6","windows_x86_64_gnu 0.52.6","windows_x86_64_gnullvm 0.52.6","windows_x86_64_msvc 0.52.6",]-[[package]]-name = "windows-targets"-version = "0.53.5"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"-dependencies = [- "windows-link",- "windows_aarch64_gnullvm 0.53.1",- "windows_aarch64_msvc 0.53.1",- "windows_i686_gnu 0.53.1",- "windows_i686_gnullvm 0.53.1",- "windows_i686_msvc 0.53.1",- "windows_x86_64_gnu 0.53.1",- "windows_x86_64_gnullvm 0.53.1",- "windows_x86_64_msvc 0.53.1",-]-[[package]]name = "windows_aarch64_gnullvm"version = "0.48.5"@@ -12141,12 +12093,6 @@ version = "0.52.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"-[[package]]-name = "windows_aarch64_gnullvm"-version = "0.53.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"-[[package]]name = "windows_aarch64_msvc"version = "0.48.5"@@ -12159,12 +12105,6 @@ version = "0.52.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"-[[package]]-name = "windows_aarch64_msvc"-version = "0.53.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"-[[package]]name = "windows_i686_gnu"version = "0.48.5"@@ -12177,24 +12117,12 @@ version = "0.52.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"-[[package]]-name = "windows_i686_gnu"-version = "0.53.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"-[[package]]name = "windows_i686_gnullvm"version = "0.52.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"-[[package]]-name = "windows_i686_gnullvm"-version = "0.53.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"-[[package]]name = "windows_i686_msvc"version = "0.48.5"@@ -12207,12 +12135,6 @@ version = "0.52.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"-[[package]]-name = "windows_i686_msvc"-version = "0.53.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"-[[package]]name = "windows_x86_64_gnu"version = "0.48.5"@@ -12225,12 +12147,6 @@ version = "0.52.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"-[[package]]-name = "windows_x86_64_gnu"-version = "0.53.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"-[[package]]name = "windows_x86_64_gnullvm"version = "0.48.5"@@ -12243,12 +12159,6 @@ version = "0.52.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"-[[package]]-name = "windows_x86_64_gnullvm"-version = "0.53.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"-[[package]]name = "windows_x86_64_msvc"version = "0.48.5"@@ -12261,12 +12171,6 @@ version = "0.52.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"-[[package]]-name = "windows_x86_64_msvc"-version = "0.53.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"-[[package]]name = "winnow"version = "0.7.14"diff --git a/rust/Cargo.toml b/rust/Cargo.tomlindex 3fcefff7c3be..72f4f41240b9 100644--- a/rust/Cargo.toml+++ b/rust/Cargo.toml@@ -177,7 +177,7 @@ 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.12.0", features = ["async-client"] }+posthog-rs = { version = "0.13.3", features = ["async-client", "capture-v1"] }redis = { version = "0.32.7", features = ["tokio-comp","cluster",diff --git a/rust/cymbal/tests/posthog_capture.rs b/rust/cymbal/tests/posthog_capture.rsindex 7810f44bf812..608d715f4ab8 100644--- a/rust/cymbal/tests/posthog_capture.rs+++ b/rust/cymbal/tests/posthog_capture.rs@@ -24,12 +24,12 @@ async fn pipeline_failure_is_captured_as_posthog_exception(db: PgPool) {let capture = posthog.mock_async(|when, then| {when.method(POST)- .path("/i/v0/e/")+ .path("/i/v1/analytics/events").body_contains("\"$exception\"").body_contains("UnhandledError").body_contains("\"service\":\"cymbal-test\"").body_contains("\"request_id\"");- then.status(200).body("{\"status\": 1}");+ then.status(200).body("{\"results\":{}}");}).await;// Catch-all so an unexpected payload shape fails the specific assertion@@ -37,7 +37,7 @@ async fn pipeline_failure_is_captured_as_posthog_exception(db: PgPool) {let fallback = posthog.mock_async(|when, then| {when.path_contains("/");- then.status(200).body("{\"status\": 1}");+ then.status(200).body("{\"results\":{}}");}).await;