Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't send negative line numbers in profiles #2158

Merged
merged 1 commit into from Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,7 @@
- Fix puma integration for versions before v5 [#2141](https://github.com/getsentry/sentry-ruby/pull/2141)
- Fix breadcrumbs with `warn` level not being ingested [#2150](https://github.com/getsentry/sentry-ruby/pull/2150)
- Fixes [#2145](https://github.com/getsentry/sentry-ruby/issues/2145)
- Don't send negative line numbers in profiles [#2158](https://github.com/getsentry/sentry-ruby/pull/2158)

## 5.12.0

Expand Down
2 changes: 1 addition & 1 deletion sentry-ruby/lib/sentry/profiler.rb
Expand Up @@ -109,7 +109,7 @@
}

frame_hash[:module] = mod if mod
frame_hash[:lineno] = frame_data[:line] if frame_data[:line]
frame_hash[:lineno] = frame_data[:line] if frame_data[:line] && frame_data[:line] >= 0

Check warning on line 112 in sentry-ruby/lib/sentry/profiler.rb

View check run for this annotation

Codecov / codecov/patch

sentry-ruby/lib/sentry/profiler.rb#L112

Added line #L112 was not covered by tests

frame_hash
end
Expand Down