: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
chore(cymbal): drop legacy apple_debug_images_json metadata key (#64334)
Catalin Irimie1f31813d4994
diff --git a/proto/cymbal/resolution/v1/resolution.proto b/proto/cymbal/resolution/v1/resolution.protoindex 4c35321edafb..40bbfcc43f01 100644--- a/proto/cymbal/resolution/v1/resolution.proto+++ b/proto/cymbal/resolution/v1/resolution.proto@@ -29,7 +29,7 @@ message ResolveItem {// Serialized rust/cymbal Exception before frame and exception remapping.bytes exception_json = 3;// Serialized resolution metadata. The current convention is JSON bytes with- // resolver-specific keys such as `apple_debug_images_json`.+ // resolver-specific keys such as `debug_images_json`.bytes metadata = 4;// Deadline for this logical exception in milliseconds. The server may shed// stale items instead of starting work it cannot return in time.diff --git a/rust/cymbal-proto/tests/contract.rs b/rust/cymbal-proto/tests/contract.rsindex a62fd1c2ac45..f31b5a3ec855 100644--- a/rust/cymbal-proto/tests/contract.rs+++ b/rust/cymbal-proto/tests/contract.rs@@ -10,7 +10,7 @@ fn resolve_item_serializes_exception_payload_with_correlation_id_and_deadline()id: 7,team_id: 42,exception_json: br#"{"type":"Error"}"#.to_vec(),- metadata: br#"{"apple_debug_images_json":[]}"#.to_vec(),+ metadata: br#"{"debug_images_json":[]}"#.to_vec(),deadline_ms: 1_500,};@@ -19,7 +19,7 @@ fn resolve_item_serializes_exception_payload_with_correlation_id_and_deadline()assert_eq!(decoded.id, 7);assert_eq!(decoded.team_id, 42);assert_eq!(decoded.exception_json, br#"{"type":"Error"}"#);- assert_eq!(decoded.metadata, br#"{"apple_debug_images_json":[]}"#);+ assert_eq!(decoded.metadata, br#"{"debug_images_json":[]}"#);assert_eq!(decoded.deadline_ms, 1_500);}diff --git a/rust/cymbal-resolution/src/service/resolve.rs b/rust/cymbal-resolution/src/service/resolve.rsindex 01f280a177c6..5412a04fdff1 100644--- a/rust/cymbal-resolution/src/service/resolve.rs+++ b/rust/cymbal-resolution/src/service/resolve.rs@@ -263,18 +263,12 @@ fn debug_images_from_metadata(metadata: &[u8]) -> Result<Vec<DebugImage>, ItemFalet metadata: serde_json::Value = serde_json::from_slice(metadata).map_err(|e| ItemFailure::InvalidPayload(format!("invalid metadata: {e}")))?;- // Prefer the generic key; fall back to the legacy apple-specific key sent- // by older cymbal deployments.- // TODO(2026-09-01): drop the legacy key once the dual-write release is fully rolled out.- let (key, debug_images) = match metadata.get("debug_images_json") {- Some(images) => ("debug_images_json", images),- None => match metadata.get("apple_debug_images_json") {- Some(images) => ("apple_debug_images_json", images),- None => return Ok(Vec::new()),- },+ let Some(debug_images) = metadata.get("debug_images_json") else {+ return Ok(Vec::new());};- serde_json::from_value(debug_images.clone())- .map_err(|e| ItemFailure::InvalidPayload(format!("invalid metadata.{key}: {e}")))+ serde_json::from_value(debug_images.clone()).map_err(|e| {+ ItemFailure::InvalidPayload(format!("invalid metadata.debug_images_json: {e}"))+ })}enum ResolveOneError {@@ -338,44 +332,31 @@ mod test {}#[test]- fn metadata_prefers_generic_debug_images_key() {- let metadata = serde_json::to_vec(&serde_json::json!({- "debug_images_json": images_json("generic"),- "apple_debug_images_json": images_json("legacy"),- }))- .unwrap();-- let images = debug_images_from_metadata(&metadata).unwrap();- assert_eq!(images.len(), 1);- assert_eq!(images[0].debug_id, "generic");- }-- #[test]- fn metadata_falls_back_to_legacy_apple_key() {+ fn metadata_reads_debug_images_key() {let metadata = serde_json::to_vec(&serde_json::json!({- "apple_debug_images_json": images_json("legacy"),+ "debug_images_json": images_json("img-1"),})).unwrap();let images = debug_images_from_metadata(&metadata).unwrap();assert_eq!(images.len(), 1);- assert_eq!(images[0].debug_id, "legacy");+ assert_eq!(images[0].debug_id, "img-1");}#[test]- fn metadata_without_debug_images_keys_is_empty() {- let metadata = serde_json::to_vec(&serde_json::json!({"other": 1})).unwrap();+ fn metadata_without_debug_images_key_is_empty() {+ // The legacy apple-specific key is no longer read, so it is ignored.+ let metadata =+ serde_json::to_vec(&serde_json::json!({"apple_debug_images_json": images_json("x")}))+ .unwrap();assert!(debug_images_from_metadata(&metadata).unwrap().is_empty());assert!(debug_images_from_metadata(&[]).unwrap().is_empty());}#[test]- fn invalid_generic_key_errors_even_when_legacy_is_valid() {- let metadata = serde_json::to_vec(&serde_json::json!({- "debug_images_json": "not-a-list",- "apple_debug_images_json": images_json("legacy"),- }))- .unwrap();+ fn invalid_debug_images_key_errors() {+ let metadata =+ serde_json::to_vec(&serde_json::json!({"debug_images_json": "not-a-list"})).unwrap();assert!(matches!(debug_images_from_metadata(&metadata),diff --git a/rust/cymbal-resolution/tests/service_tests.rs b/rust/cymbal-resolution/tests/service_tests.rsindex 5fe529906d15..62a0d5a04d18 100644--- a/rust/cymbal-resolution/tests/service_tests.rs+++ b/rust/cymbal-resolution/tests/service_tests.rs@@ -397,17 +397,12 @@ async fn invalid_payload_and_metadata_formats_are_invalid_payload_errors() {deadline_ms: 1_000,},make_item_with_metadata(2, &exc, b"not-json".to_vec()),- make_item_with_metadata(- 3,- &exc,- br#"{"apple_debug_images_json":"not-a-list"}"#.to_vec(),- ),- make_item_with_metadata(4, &exc, br#"{"debug_images_json":"not-a-list"}"#.to_vec()),+ make_item_with_metadata(3, &exc, br#"{"debug_images_json":"not-a-list"}"#.to_vec()),],).await;- assert_eq!(outcomes.len(), 4);+ assert_eq!(outcomes.len(), 3);for outcome in outcomes {assert_eq!(error_kind(&outcome), ErrorKind::InvalidPayload);}diff --git a/rust/cymbal/README.md b/rust/cymbal/README.mdindex 5b91f85e3b0d..563f265adb26 100644--- a/rust/cymbal/README.md+++ b/rust/cymbal/README.md@@ -25,7 +25,7 @@ controls a deterministic event-level rollout. Events selected for remoteprocessing are grouped per team, flattened into exception-level `ResolveItem`s,and submitted over a bidirectional `Resolve` stream. Each item carries JSON`metadata` bytes for resolver-specific context such as-`apple_debug_images_json`, and each terminal `ResolveOutcome` is correlated by+`debug_images_json`, and each terminal `ResolveOutcome` is correlated byitem id. Sampled remote attempts do not fall back to local resolution if theremote pool fails; unsampled events use the inline local exception and frameresolvers and then rejoin the same properties/grouping/linking pipeline.diff --git a/rust/cymbal/docs/compatibility.md b/rust/cymbal/docs/compatibility.mdindex 13301ae48748..3d6279b713b1 100644--- a/rust/cymbal/docs/compatibility.md+++ b/rust/cymbal/docs/compatibility.md@@ -28,7 +28,7 @@ No generated type changes are needed:- Sampled events use the remote pool and do not silently fall back to local resolution on remote failures.- Unsampled events use the local exception and frame resolvers.- Sampled remote exceptions are grouped per team, flattened into `ResolveItem`s, and submitted over per-endpoint bidirectional `Resolve` streams.-- Resolver-specific context is carried in `ResolveItem.metadata` as JSON bytes. The current Apple symbolication convention uses an `apple_debug_images_json` key.+- Resolver-specific context is carried in `ResolveItem.metadata` as JSON bytes. The native symbolication convention uses a `debug_images_json` key.- Per-item `ResolveOutcome.Error.kind` is the control-flow surface. `ERROR_KIND_OVERLOADED` is result-only backpressure and triggers item reroute. Accepted items emit `ResolveOutcome.Accepted` before their terminal outcome; cymbal releases its routing permit on that acceptance signal. If `CYMBAL_REMOTE_RESOLUTION_OVERLOAD_EJECTION_MS` is non-zero, the overloaded endpoint is also temporarily excluded from new routing in that cymbal process. Repeated overloads double that cooldown up to `CYMBAL_REMOTE_RESOLUTION_OVERLOAD_EJECTION_MAX_MS`, and a quiet `CYMBAL_REMOTE_RESOLUTION_OVERLOAD_EJECTION_DECAY_MS` window resets it. `CYMBAL_REMOTE_RESOLUTION_ROUTING_JITTER` controls how much routing flattens across the rendezvous-ranked candidate list (`0.0` strict rank-0 sticky, `1.0` uniform across candidates). `LoadEvent` is only endpoint freshness/draining state.This means Node request chunking limits protect cymbal's public HTTP body size, while cymbal's private gRPC path owns exception-level routing, reroute depth, and overload handling.diff --git a/rust/cymbal/src/stages/resolution/remote/resolver/partition.rs b/rust/cymbal/src/stages/resolution/remote/resolver/partition.rsindex e0052ca719d3..6d9dabd74df4 100644--- a/rust/cymbal/src/stages/resolution/remote/resolver/partition.rs+++ b/rust/cymbal/src/stages/resolution/remote/resolver/partition.rs@@ -71,9 +71,6 @@ fn prepare_remote_event(} else {serde_json::to_vec(&serde_json::json!({"debug_images_json": evt.debug_images,- // Legacy key still read by older cymbal-resolution deployments.- // TODO(2026-09-01): drop once the dual-read release is fully rolled out.- "apple_debug_images_json": evt.debug_images,})).map_err(UnhandledError::from)?};diff --git a/rust/cymbal/tests/remote_resolution.rs b/rust/cymbal/tests/remote_resolution.rsindex 735680cb0369..a21f8d783809 100644--- a/rust/cymbal/tests/remote_resolution.rs+++ b/rust/cymbal/tests/remote_resolution.rs@@ -377,7 +377,7 @@ async fn accepted_outcomes_release_routing_slots_before_terminal_completion() {}#[tokio::test]-async fn metadata_encodes_debug_images_under_both_keys() {+async fn metadata_encodes_debug_images_json() {let (addr, _streams, items) = spawn_recording_stub_server(ServerBehavior::Happy).await;let ctx = make_ctx(&[addr], 0, Duration::from_secs(5)).await;let mut evt = build_event(1);@@ -405,11 +405,8 @@ async fn metadata_encodes_debug_images_under_both_keys() {metadata["debug_images_json"][0]["debug_id"],serde_json::Value::String("ABCDEF".to_string()));- // Legacy key still written for older cymbal-resolution readers during rollout.- assert_eq!(- metadata["apple_debug_images_json"][0]["debug_id"],- serde_json::Value::String("ABCDEF".to_string())- );+ // The legacy apple-specific key is no longer written.+ assert!(metadata.get("apple_debug_images_json").is_none());}#[tokio::test]