Comments (4)
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.
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.
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.
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)
- Typo in Changelog HOT 1
- Report activejob errors only when the job is discarded HOT 2
- Rails.error.report is missing information compared to Appsignal.set_error HOT 9
- Cron heartbeats support HOT 3
- AppSignal Agent crashes and stops logging: No longer owner of lock file '/tmp/appsignal/agent.lock', agent exiting HOT 2
- Integrate with the `autotuner` Gem HOT 1
- 3.7.3 LocalJumpError during asset precompilation HOT 3
- Report sidekiq errors only when the job is discarded HOT 1
- Broadcasting logs to Appsignal fails to record exception HOT 5
- Reapply rack response body instrumentation
- Rack EventHandler should listen to appsignal.action HOT 1
- Report GVL metrics per process HOT 2
- Not reporting request params (for Sinatra?)
- Deprecate appsignal.route and appsignal.action request keys
- Don't create instrumentation event from Rails middleware
- Instrument Rake tasks HOT 1
- Add custom data helper
- Add set_params helper for Appsignal module
- Add set_tags helper alias for Appsignal module
- Support multiple errors per transaction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appsignal-ruby.