From 7a65d3fcb2786bd867142f85557f50dbd988601f Mon Sep 17 00:00:00 2001 From: Neel Shah Date: Thu, 2 Nov 2023 14:19:55 +0100 Subject: [PATCH] Don't send negative line numbers in profiles (#2158) --- CHANGELOG.md | 1 + sentry-ruby/lib/sentry/profiler.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c37a76bbb..1d76e0fb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/sentry-ruby/lib/sentry/profiler.rb b/sentry-ruby/lib/sentry/profiler.rb index 4d9532caf..949a9aecb 100644 --- a/sentry-ruby/lib/sentry/profiler.rb +++ b/sentry-ruby/lib/sentry/profiler.rb @@ -109,7 +109,7 @@ def to_hash } 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 frame_hash end