Use insert_id as partition key for crash events (#28293)

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld 2025-04-07 17:24:31 -07:00 committed by GitHub
parent b306a0221b
commit 0dc3dffe38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -161,16 +161,22 @@ pub async fn post_crash(
"description": description, "description": description,
"backtrace": summary, "backtrace": summary,
}); });
SnowflakeRow::new( let row = SnowflakeRow::new(
"Crash Reported", "Crash Reported",
None, None,
false, false,
Some(installation_id), Some(installation_id),
properties, properties,
) );
.write(&Some(kinesis_client), &Some(stream)) let data = serde_json::to_vec(&row)?;
.await kinesis_client
.log_err(); .put_record()
.stream_name(stream)
.partition_key(row.insert_id.unwrap_or_default())
.data(data.into())
.send()
.await
.log_err();
} }
} }
@ -364,16 +370,22 @@ pub async fn post_panic(
"description": panic.payload, "description": panic.payload,
"backtrace": backtrace, "backtrace": backtrace,
}); });
SnowflakeRow::new( let row = SnowflakeRow::new(
"Panic Reported", "Panic Reported",
None, None,
false, false,
panic.installation_id.clone(), panic.installation_id.clone(),
properties, properties,
) );
.write(&Some(kinesis_client), &Some(stream)) let data = serde_json::to_vec(&row)?;
.await kinesis_client
.log_err(); .put_record()
.stream_name(stream)
.partition_key(row.insert_id.unwrap_or_default())
.data(data.into())
.send()
.await
.log_err();
} }
} }