Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion sentry-core/src/performance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ pub type TracesSampler = dyn Fn(&TransactionContext) -> f32 + Send + Sync;
// global API types:

/// A wrapper that groups a [`Transaction`] and a [`Span`] together.
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq)]
pub enum TransactionOrSpan {
/// A [`Transaction`].
Transaction(Transaction),
Expand Down Expand Up @@ -958,6 +958,12 @@ impl Transaction {
}
}

impl PartialEq for Transaction {
fn eq(&self, other: &Self) -> bool {
Arc::ptr_eq(&self.inner, &other.inner)
}
}

/// A smart pointer to a span's [`data` field](protocol::Span::data).
pub struct Data<'a>(MutexGuard<'a, protocol::Span>);

Expand Down Expand Up @@ -1203,6 +1209,12 @@ impl Span {
}
}

impl PartialEq for Span {
fn eq(&self, other: &Self) -> bool {
Arc::ptr_eq(&self.span, &other.span)
}
}

/// Represents a key-value pair such as an HTTP header.
pub type TraceHeader = (&'static str, String);

Expand Down
Loading