Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
- Deprecated `ClientOptions::enable_metrics`. The option is now a no-op; metrics are always enabled. To stop sending metrics, stop calling the metrics APIs ([#1300](https://github.com/getsentry/sentry-rust/pull/1300)).
- Deprecated [`Transaction::is_sampled`](https://docs.rs/sentry-core/0.49.2/sentry_core/struct.Transaction.html#method.is_sampled), [`Span::is_sampled`](https://docs.rs/sentry-core/0.49.2/sentry_core/struct.Span.html#method.is_sampled), and [`TransactionOrSpan::is_sampled`](https://docs.rs/sentry-core/0.49.2/sentry_core/enum.TransactionOrSpan.html#method.is_sampled). These methods cannot distinguish between an unsampled transaction or span and a deferred sampling decision when tracing is disabled ([#1293](https://github.com/getsentry/sentry-rust/pull/1293)).

### Fixes

- Corrected disabled tracing semantics: transactions and spans created while tracing is disabled are ignored without generating client reports, while sampling decisions received from upstream traces continue to be propagated in outgoing trace headers. An explicit `0.0` trace sample rate remains distinct from disabled tracing and continues to generate client reports for locally unsampled transactions ([#1286](https://github.com/getsentry/sentry-rust/pull/1286)).

## 0.49.1

### Fixes
Expand Down
5 changes: 5 additions & 0 deletions sentry-core/src/performance/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ impl TracePropagationContext {
})
}

/// Set the `sampled` field, accepting `Option` values.
pub(crate) fn with_maybe_sampled(self, sampled: Option<bool>) -> Self {
Comment thread
szokeasaurusrex marked this conversation as resolved.
Self { sampled, ..self }
}

/// Attempts to construct a [`TracePropagationContext`] from the given Sentry trace header.
///
/// Returns [`None`] if the header cannot be parsed.
Expand Down
Loading