From 2a5958b1146ba5af2c56dcbaa173d37c501e7d31 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2026 10:02:04 +0000 Subject: [PATCH 1/2] docs(core): Correct TransactionData::iter docs about unsampled transactions The iterator checks whether transaction data exists, which happens whenever a client is bound, independently of the sampling decision. Clarify that sampling only controls whether the transaction is sent. Fixes #1350 Co-Authored-By: Daniel SzokeNSTEIN <7881302+szokeasaurusrex@users.noreply.github.com> --- sentry-core/src/performance/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sentry-core/src/performance/mod.rs b/sentry-core/src/performance/mod.rs index 835adb52..fbda0928 100644 --- a/sentry-core/src/performance/mod.rs +++ b/sentry-core/src/performance/mod.rs @@ -753,9 +753,10 @@ impl<'a> TransactionData<'a> { /// Iterate over the [data attributes](protocol::TraceContext::data) /// associated with this [transaction][protocol::Transaction]. /// - /// If the transaction is not sampled for sending, - /// the metadata will not be populated at all, - /// so the produced iterator is empty. + /// Data attributes are recorded independently of the sampling decision, which only + /// controls whether the transaction is sent once it finishes. The produced iterator + /// is empty if no client was bound when the transaction started, or after the + /// transaction has finished. pub fn iter(&self) -> Box + '_> { if self.0.transaction.is_some() { Box::new(self.0.context.data.iter()) From bd95c60b4b31f29a3f22a67064ae69b2ab8fd8f6 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2026 10:28:21 +0000 Subject: [PATCH 2/2] docs(core): Only mention the no-client case in TransactionData::iter docs Co-Authored-By: Daniel SzokeNSTEIN <7881302+szokeasaurusrex@users.noreply.github.com> --- sentry-core/src/performance/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sentry-core/src/performance/mod.rs b/sentry-core/src/performance/mod.rs index fbda0928..60ba6812 100644 --- a/sentry-core/src/performance/mod.rs +++ b/sentry-core/src/performance/mod.rs @@ -753,10 +753,8 @@ impl<'a> TransactionData<'a> { /// Iterate over the [data attributes](protocol::TraceContext::data) /// associated with this [transaction][protocol::Transaction]. /// - /// Data attributes are recorded independently of the sampling decision, which only - /// controls whether the transaction is sent once it finishes. The produced iterator - /// is empty if no client was bound when the transaction started, or after the - /// transaction has finished. + /// If no client was bound when the transaction was started, + /// the produced iterator is empty. pub fn iter(&self) -> Box + '_> { if self.0.transaction.is_some() { Box::new(self.0.context.data.iter())