Comments (11)
both of those are good options and it might make sense to include those examples in the docs. However, I don't think it is the job of this plugin to pick an implementation. In particular some apps might have a queuing solution already. You might prefer to use a queue instead of just starting threads so that you can control how many threads are working on sending Airbrake errors, and you probably get better failure handling etc.
Maybe we could provide some configuration option to pick Thread Starting or the ExecutorService but I'm not convinced its worth it and users of the plugin should feel free to pick the implementation that they want/need.
from airbrake-grails.
However, I don't think it is the job of this plugin to pick an implementation.
But the plugin does already choose a default implementation - sending each notice in the same thread as the request. Most people will use this default and IMO it's the worst of the 3 options (same request, new thread, thread pool).
I think a better solution would be to send each notice in a separate thread by default, but the user can choose to configure a thread pool instead (with max threads specified by the user). I really can't imagine why anyone would want the notice sent in the same thread as the request.
from airbrake-grails.
That might be true but the simple Thread start is IMO a really terrible option too and not one I'd want to include as the default, it just has too many failure modes at any scale. Picking anything more realistic introduces some external dependency that would be unnecessary if you don't want that.
For context the Ruby gem does not do async by default. I'm ok with that. Maybe we should just word the documentation more strongly to pick a sensible async option for you app.
from airbrake-grails.
Picking anything more realistic introduces some external dependency that would be unnecessary if you don't want that.
Using a thread-pool doesn't introduce any external dependencies. If we use this as the only supported asynchronous strategy we could remove the current dependency on Quartz.
Maybe we should just word the documentation more strongly to pick a sensible async option for you app.
I think it would be preferable for the out-of-the-box behaviour to be a sensible async strategy e.g. thread pool with 5 threads, but the user can customise the number of threads if necessary.
from airbrake-grails.
There is no production dependency on quartz, only in test of the plugin
from airbrake-grails.
But you can't compile the plugin without Quartz on your classpath, because both of these classes (which are not in src/test) have a dependency on Quartz:
Also, there is a compile-scoped (not test-scoped) Quartz dependency in BuildConfig.groovy
https://github.com/cavneb/airbrake-grails/blob/master/grails-app/conf/BuildConfig.groovy
So while the intention might have been to only require for testing, that's not in fact the case in the current version
from airbrake-grails.
If there is a lightweight thread pooling solution with minimal dependencies then a pull request would be great.
from airbrake-grails.
Wrt the quartz plugin. Grails should pull in the plugin for you. You shouldn't need to do anything to add it to the classpath. I didn't think it was a big deal for developers of the plugin to deal with that. Consumers of the plugin don't notice the difference. That said if there is a simpler solution for proving the async feature for testing I'm all for removing the quartz stuff altogether.
from airbrake-grails.
The Java standard libraries (classes in java.util.concurrent and specifically the ExecutorService class) provide thread pooling, so there's a solution that doesn't require any external dependencies.
I'll submit a pull request that replaces Quartz with this if we're agreed on that?
from airbrake-grails.
Sounds good.
from airbrake-grails.
fixed as part of pull request 22
from airbrake-grails.
Related Issues (20)
- unhandled exception message HOT 11
- filter stacktraces HOT 2
- Error in docs HOT 1
- Should we provide information for nested exceptions? HOT 6
- notifications sent synchronously by default HOT 2
- grails 2.2 upgrade and private Map getCgiData(webRequest)
- Unable to compile v0.9.1 HOT 3
- Docs should say that grails.plugins.airbrake stuff should be on error on log4j config HOT 3
- Make plugin more resilient to server unavailability HOT 3
- logging error without exception doesn't work with Errbit HOT 4
- Exclude exceptions of certain types HOT 3
- Plugin does't send the actual exception class to airbrake HOT 3
- script for airbrake deploy notification HOT 6
- Change documentation button URL
- support for grails 3 HOT 11
- make environment configuration more flexible HOT 1
- Migrate to v3 Notifier API
- Keep the latest version in master
- Truncate messages that would exceed Airbrake's limit
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 airbrake-grails.