pedestal

donaldball 2019-06-07T19:48:26.002Z

Is anyone aware of a fairly uninvasive way to, given pedestal routes, an interceptor name (e.g. ::json-response), and an event name (e.g. :leave), of recording the timing of every such event?

orestis 2019-06-07T20:28:40.002800Z

Is the :leave event the interceptor chain event :leave? as in :enter, :leave, :error?

orestis 2019-06-07T20:29:06.003500Z

(I don’t have an answer, just want to understand the question)

donaldball 2019-06-07T20:32:33.005500Z

Yea. There are a few interceptor events I’m interested in getting performance metrics on and I’d like to do it declaratively. Pedestal’s architecture facilitates this, but I’m almost a little surprised it doesn’t already have such a feature.

donaldball 2019-06-07T20:33:51.006600Z

My current impl thought is to walk the results of io.pedestal.http.route/expand-routes and wrap the target interceptors in each route individually

2019-06-07T23:37:58.012600Z

Hi @donaldball, Pedestal’s interceptor chain execution is managed by the io.pedestal.interceptor.chain ns. The current implementation does not support that level of instrumentation. While there’s an option to get more information regarding interceptor chain execution by using a more verbose logging level (i.e., DEBUG, TRACE), it doesn’t sound like that’s what you are looking for. Your best bet is to either instrument the interceptors yourself or, if you’d like to get metrics for a production service, leverage an instrumentation library (i.e., New Relic) which is compatible with pedestal.log’s metric implementation. If you do the later, you likely need to add write an interceptor to identify requests (i.e., name transactions in New Relic). The benefit of using an instrumentation lib is that you’ll be able to collect information for all your apis and filter them as you see fit.

2019-06-07T23:40:16.013Z

Although I’ve no experience with this, it may be useful: https://metrics.dropwizard.io/3.1.0/manual/servlet/#