开发者

Exception Reporting Pipeline in High-Volume App Servers

In an app server handling many concurrent requests, some requests get exceptions - e.g. unknown user, couldn't access third part system etc.

Given the number of requests is high, just dumping these to the log is not very helpful. We've taken to keeping counters exposed by JMX for key errors and graphing these, but I was wondering if anyone knows of a good exception handling pipeline, e.g.:

boolean canContinue = exceptionManager.submit(Throwable)

The ExceptionManager would be configured with a handler for each specialised exception, plus generic fall backs. These would decide how to proceed - e.g. return fail, record and continue etc. In addition co开发者_JS百科uld expose metrics through a single point.

It seems like this would be something someone has already formalised - so before I re-invent the wheel if you know what I mean and know a good framework, please let me know!

Thanks.


Apache Camel has implemented this as a part of its routing mechanisms, but afaiu you don't use Camel and moving to it is not a choice. So the best move I deem will be having a separate errors.log file plus JMX page as you've mentioned. If handling errors is something generic, you can leverage AOP for these purposes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜