Skip to content

docs(core): Correct TransactionData::iter docs about unsampled transactions - #1351

Merged
szokeasaurusrex merged 2 commits into
masterfrom
junior/fix-transaction-data-iter-docs
Oct 13, 2026
Merged

szokeasaurusrex merged 2 commits into
masterfrom
junior/fix-transaction-data-iter-docs

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

The doc comment on TransactionData::iter said that unsampled transactions have no populated metadata, so the iterator is empty. That's wrong. The iterator checks transaction.is_some(), and Transaction::new sets that whenever a client is bound, no matter what the sampling decision is.

This changes only the doc comment. It now just says that the iterator is empty if no client was bound when the transaction was started.

There's no runtime change. cargo doc -p sentry-core --no-deps gives the same warning count before and after (all of those warnings already exist and are unrelated).

Fixes #1350

via @szokeasaurusrex.

--

View Junior Session [Sentry]

…ctions

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-junior
sentry-junior Bot requested a review from a team as a code owner October 13, 2026 10:02
…docs

Co-Authored-By: Daniel SzokeNSTEIN <7881302+szokeasaurusrex@users.noreply.github.com>
@szokeasaurusrex
szokeasaurusrex enabled auto-merge (squash) October 13, 2026 10:30
@szokeasaurusrex
szokeasaurusrex merged commit d1e05c0 into master Oct 13, 2026
31 checks passed
@szokeasaurusrex
szokeasaurusrex deleted the junior/fix-transaction-data-iter-docs branch October 13, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Correct TransactionData::iter documentation about unsampled transactions

1 participant