Skip to content

StacktraceBuilder using context_lines, not data_collection.frame_context_lines #3157

Closed

Description

@zarqman

In sentry-ruby v7.1.0, it appears that StacetraceBuilder is still still using context_lines, not data_collection.frame_context_lines.

With context_lines -- correct result, but get a warning

Sentry.init do |config|
  config.context_lines = nil
end

WARN -- sentry: ** [Sentry] `context_lines` is deprecated; use `data_collection.frame_context_lines` instead.
Sentry.configuration.stacktrace_builder.context_lines
# => nil

With data_collection.frame_context_lines -- no warning, but incorrect result

Sentry.init do |config|
  config.data_collection.frame_context_lines = nil
end

Sentry.configuration.stacktrace_builder.context_lines
# => 3

I believe this is still the old reference (L835):

def stacktrace_builder
@stacktrace_builder ||= StacktraceBuilder.new(
project_root: @project_root.to_s,
app_dirs_pattern: @app_dirs_pattern,
linecache: @linecache,
context_lines: @context_lines,
backtrace_cleanup_callback: @backtrace_cleanup_callback,
strip_backtrace_load_path: @strip_backtrace_load_path
)
end

Activity

  1. linear-code commented on Oct 27, 2026

    @linear-code
  2. sl0thentr0py commented on Oct 27, 2026

    @sl0thentr0py
    Member

    thx @zarqman for the report, somehow missed this

  3. added a commit that references this issue on Oct 27, 2026
    0c5f9a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions