Hi,
I have something similar working here. Here are my thoughs based on
about 6 month experience with it.
I didn't use Middleware::Debug, instead I have a separate App that
ties to the storage backend. Why? because I can use the same app to
see the log of any request, either on devel, or in production (I can
tag a client with a "debug this client only").
Every request checks the "debug level" flag (than can be per user) and
this is used by the logging module (custom made in this case), and our
timing infrastructure (pretty name for a 10 line module that uses
Time::HiRes to time a anon sub and submit the result to the logger
module.)
Every request gets a UUID. This UUID is sent back to the app in a
cookie. We can enable a JS bit on any page (currently via console, I
need to tweak that into bookmarklet-fu), that adds a small debug box
that link to our backend where the debug App resides with the
appropriate UUID.
We can also track the last N Request<->UUID<->authenticated_user on
our back office.
On the debug app, I can see the logs, the timing information, and some
business stuff we extract from the logs.
What I think is worth sharing? The API the debug App uses. If it can
be done in a modular way like the current Middleware::Debug, you would
only need to standardize the API each panel would use to fetch the
information. This would allow anyone to either reuse the app with his
pluggable panel setup, or build a new debug app using the same API.
Either way, adding new panels (for ex, a better SQL logger) would mean:
* define the API;
* add sample panel to debug app.
I don't know if it would be helpful to tackle the collection and/or
storage of the information server-side. There is too many choices of
logging infrastructure, storage infrastructure, to build a single
solution to that part IMHO.
Just my €0.01.
Bye,
--
Pedro Melo
@pedromelo
http://www.simplicidade.org/
http://about.me/melo
xmpp:me...@simplicidade.org
mailto:
me...@simplicidade.org