Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError: undefined method complete!' for #<Appsignal::Transaction:0x00000010452148>` #68

Closed
erawk opened this issue Sep 10, 2015 · 3 comments

Comments

@erawk
Copy link

erawk commented Sep 10, 2015

We are running the beta gem:

deployment@worker1:~/our-app/current$ cat Gemfile.lock |grep appsignal
    appsignal (0.12.beta.31)
  appsignal (~> 0.12.beta)

It's been working great so far.

Unfortunately, when we wrap our rake tasks in Rake.appsignal_exception_handling, this exception gets throw:

NoMethodError: undefined method `complete!' for #<Appsignal::Transaction:0x00000010452148>
~our-app/releases/20150909145922/lib/rake_helper.rb:19:in `appsignal_exception_handling'
...

Is there a method missing in the beta gem that used to be in the old? What do we need to do to fix?

@erawk
Copy link
Author

erawk commented Sep 10, 2015

Additionally, here is the body of our wrapper:

module RakeHelper
  def self.appsignal_exception_handling(type, classname, method)
    Appsignal::Transaction.create(SecureRandom.uuid, ENV.to_hash)

    begin
      ActiveSupport::Notifications.instrument(
        "perform_job.#{type}",
        :class => "#{type.titleize}::#{classname.titleize.gsub(' ','')}",
        :method => "#{method}",
      ) do
        yield
      end
    rescue Exception => exception
      unless Appsignal.is_ignored_exception?(exception)
        Appsignal::Transaction.current.add_exception(exception)
      end
      raise exception
    ensure
      Appsignal::Transaction.current.complete!
    end
  end
end

@thijsc
Copy link
Member

thijsc commented Sep 10, 2015

Thanks for the report. We're going to put this method back in place in the next beta version.

@erawk
Copy link
Author

erawk commented Sep 10, 2015

👍

@erawk erawk closed this as completed Sep 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants