GithubHelp home page GithubHelp logo

Comments (4)

1st8 avatar 1st8 commented on July 26, 2024

I think the problem is rather simple:
When an exception happens in the @app.call(env) part, it is added to the transaction as usual.
Since the exception is then re-raised, no StreamWrapper instance is returned, and the transaction has thus no way of ever completing.

I think adding something like this after line 38 would solve the problem:

Appsignal::Transaction.complete_current! if transaction.has_error?

Unfortunately I can't find anything like Appsignal::Transaction#has_error, otherwise I would've submitted a PR.

from appsignal-ruby.

thijsc avatar thijsc commented on July 26, 2024

This was an oversight on our part, we removed the Rack listener but have not provided a replacement yet. Appsignal::Rack::StreamingListener is intended for situations where you keep a Rack response open for long periods of time. I'll have a look at reinstating the Rack listener later this week.

Is this a custom Rack app? Or do you use a framework we don't support out of the box yet?

from appsignal-ruby.

1st8 avatar 1st8 commented on July 26, 2024

Whoops, I forgot about this.
I am using Hanami, formerly Lotus.rb, but a plain Rack middleware is my preferred solution.
The referenced PR #99 resolved my issue and should help making the StreamingListener usable for non-streaming use-cases in general.
Does my explanation above and the referenced solution sense for you?

from appsignal-ruby.

thijsc avatar thijsc commented on July 26, 2024

Thanks for the pull! The streaming listener is intended for situations where you keep a stream open for longer periods of time. I've added a replacement for the old Rack instrumentation in #103. Would that fix your use case?

from appsignal-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.