Skip to content

chore(ruby): Remove unused Configuration error tracking - #3164

Merged
sl0thentr0py merged 2 commits into
masterfrom
chore/remove-unused-configuration-error-messages
Oct 29, 2026
Merged

sl0thentr0py merged 2 commits into
masterfrom
chore/remove-unused-configuration-error-messages

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Weekly cleanup: removes Sentry::Configuration#error_messages and the @errors tracking that only existed to feed it.

What's removed

  • Configuration#error_messages (@api private). Its last caller was the transport's "Envelope not sent: ..." debug log, which was removed in Avoid duplicated sampling on Transaction events #1601 (Nov 2021).
  • The errors reader (@!visibility private), the @errors array, and the private valid? / capture_in_environment? helpers that only existed to append messages to it. sending_to_dsn_allowed? now just returns !!@dsn&.valid? && enabled_in_current_env?.
  • Three spec assertions that checked the errors contents. The sending_allowed? true/false assertions next to them stay.

Why it's safe

  • Once error_messages is gone, nothing in the monorepo reads errors/@errors except those spec assertions (git grep across all gems, specs, and docs).
  • sending_to_dsn_allowed? returns the same boolean as before. It also stops resetting and mutating @errors every time it's called.

No CHANGELOG entry, because AGENTS.md says the changelog is generated during release.

via @sl0thentr0py.

--

View Junior Session [Sentry]

sentry-junior Bot and others added 2 commits October 29, 2026 10:12
Its last caller was removed in #1601 when the transport stopped checking
sending_allowed?. The method is @api private and nothing in the monorepo
calls it.
With error_messages gone, nothing reads @errors outside of specs. Drop the
private errors reader and the helpers that only existed to populate it,
which also stops sending_to_dsn_allowed? from mutating state on every call.

Co-Authored-By: Neel Shah <6536764+sl0thentr0py@users.noreply.github.com>
@sentry-junior sentry-junior Bot changed the title chore(ruby): Remove unused Configuration#error_messages chore(ruby): Remove unused Configuration error tracking Oct 29, 2026
@sl0thentr0py
sl0thentr0py merged commit ac534f3 into master Oct 29, 2026
157 checks passed
@sl0thentr0py
sl0thentr0py deleted the chore/remove-unused-configuration-error-messages branch October 29, 2026 11:14
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.

1 participant