Skip to content

fix(data-collection): Use frame_context_lines in stacktrace builder - #3158

Merged
sl0thentr0py merged 1 commit into
masterfrom
fix/frame-context-lines-3157
Oct 27, 2026
Merged

sl0thentr0py merged 1 commit into
masterfrom
fix/frame-context-lines-3157

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Configuration#stacktrace_builder still passed the deprecated context_lines, so setting data_collection.frame_context_lines had no effect on captured source context.

The builder now reads data_collection.frame_context_lines. To keep the deprecated option working, context_lines= now copies its value into data_collection, the same way include_local_variables= does. DataCollection.backfill also copies it on the send_default_pii = true path; before, it returned before reaching that line.

Fixes #3157
Fixes RUBY-237

via @sl0thentr0py.

--

View Junior Session [Sentry]

StacktraceBuilder still read the deprecated context_lines, so
data_collection.frame_context_lines had no effect. Read
frame_context_lines instead and backfill it from context_lines= (and
from send_default_pii=true) so the legacy option keeps working.

Fixes #3157

Co-Authored-By: Neel Shah <6536764+sl0thentr0py@users.noreply.github.com>
@linear-code

linear-code Bot commented Oct 27, 2026

Copy link
Copy Markdown

RUBY-237

@sl0thentr0py
sl0thentr0py merged commit 0c5f9a2 into master Oct 27, 2026
157 checks passed
@sl0thentr0py
sl0thentr0py deleted the fix/frame-context-lines-3157 branch October 27, 2026 12:44
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.

StacktraceBuilder using context_lines, not data_collection.frame_context_lines

1 participant