pub struct ExceptionRecord {
pub id: Uuid,
pub component: String,
pub kind: ExceptionKind,
pub message: String,
pub stacktrace: String,
pub span_chain: Vec<String>,
pub module_path: Option<String>,
pub location: Option<String>,
pub timestamp: DateTime<Utc>,
pub dedup_signature: String,
pub reported: bool,
pub duplicate_of: Option<String>,
}Expand description
单条异常记录。
每次捕获异常时创建一条记录,包含完整的上下文信息用于后续 签名计算、归一化和上报。
Fields§
§id: Uuid全局唯一标识。
component: String产生异常的组件名,如 "token-fleet-switch"。
kind: ExceptionKind异常来源类型。
message: String异常消息,截断至 500 字符。
stacktrace: String完整堆栈信息。
span_chain: Vec<String>tracing span 链(从外到内)。
module_path: Option<String>产生异常的 Rust 模块路径。
location: Option<String>源码位置,格式为 file:line。
timestamp: DateTime<Utc>异常发生时间(UTC)。
dedup_signature: StringSHA256 归一化签名,用于本地去重。
reported: bool是否已上报。
duplicate_of: Option<String>关联的 GitHub Issue URL(重复异常时填写)。
Implementations§
Trait Implementations§
Source§impl Clone for ExceptionRecord
impl Clone for ExceptionRecord
Source§fn clone(&self) -> ExceptionRecord
fn clone(&self) -> ExceptionRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExceptionRecord
impl Debug for ExceptionRecord
Source§impl<'de> Deserialize<'de> for ExceptionRecord
impl<'de> Deserialize<'de> for ExceptionRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExceptionRecord
impl RefUnwindSafe for ExceptionRecord
impl Send for ExceptionRecord
impl Sync for ExceptionRecord
impl Unpin for ExceptionRecord
impl UnsafeUnpin for ExceptionRecord
impl UnwindSafe for ExceptionRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more