lib/elastic_apm/error_builder.rb in elastic-apm-2.6.1 vs lib/elastic_apm/error_builder.rb in elastic-apm-2.7.0
- old
+ new
@@ -9,9 +9,11 @@
def build_exception(exception, context: nil, handled: true)
error = Error.new context: context || Context.new
error.exception = Error::Exception.new(exception, handled: handled)
+ Util.reverse_merge!(error.context.tags, @agent.config.default_tags)
+
if exception.backtrace
add_stacktrace error, :exception, exception.backtrace
end
add_current_transaction_fields error, ElasticAPM.current_transaction