From 94a489516ec4aea8d366dd6ff03066d9cfbbf79a Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Thu, 27 Jul 2023 03:39:44 -0700 Subject: [PATCH] Expose `:value` in `SingleExceptionInterface` (#2072) --- CHANGELOG.md | 6 ++++++ sentry-ruby/lib/sentry/interfaces/single_exception.rb | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ccf7d5a6..5ec6fd7db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## Unreleased + +### Features + +- Make `:value` in `SingleExceptionInterface` writable, so that it can be modified in `before_send` under `event.exception.values[n].value` [#2072](https://github.com/getsentry/sentry-ruby/pull/2072) + ## 5.10.0 ### Features diff --git a/sentry-ruby/lib/sentry/interfaces/single_exception.rb b/sentry-ruby/lib/sentry/interfaces/single_exception.rb index 4d08ec5b3..ad6b63b34 100644 --- a/sentry-ruby/lib/sentry/interfaces/single_exception.rb +++ b/sentry-ruby/lib/sentry/interfaces/single_exception.rb @@ -11,7 +11,8 @@ class SingleExceptionInterface < Interface OMISSION_MARK = "...".freeze MAX_LOCAL_BYTES = 1024 - attr_reader :type, :value, :module, :thread_id, :stacktrace + attr_reader :type, :module, :thread_id, :stacktrace + attr_accessor :value def initialize(exception:, stacktrace: nil) @type = exception.class.to_s