class ElasticAPM::Error::Exception

def self.from_exception(exception, **attrs)

def self.from_exception(exception, **attrs)
  new({
    message: exception.message.to_s,
    type: exception.class.to_s,
    module: format_module(exception),
    cause: exception.cause && Exception.from_exception(exception.cause)
  }.merge(attrs))
end