lib/elastic_apm/error_builder.rb in elastic-apm-2.12.0 vs lib/elastic_apm/error_builder.rb in elastic-apm-3.0.0

- old
+ new

@@ -7,10 +7,11 @@ @agent = agent end def build_exception(exception, context: nil, handled: true) error = Error.new context: context || Context.new - error.exception = Error::Exception.new(exception, handled: handled) + error.exception = + Error::Exception.from_exception(exception, handled: handled) Util.reverse_merge!(error.context.labels, @agent.config.default_labels) if exception.backtrace add_stacktrace error, :exception, exception.backtrace