mekhat 0.1.0
mekhat: ^0.1.0 copied to clipboard
An in-page request bar for Maat applications.
Mekhat #
[mekhat — An in-page request bar for Maat applications.]
An in-page request bar for Maat applications. Mekhat is the balance: it renders what Udjat collected about the request you are looking at — right into the page that caused it — with no login, no second tab, and no storage of its own.
Application.configure(...)
.withExtensions([udjatExtension, mekhatExtension])
.create();
Both extensions are needed: Mekhat renders what Udjat collects.
Install #
maat mekhat:install # publishes config/mekhat.dart
Three conditions, all required #
The bar never runs unless:
mekhat.enabledistrue.app.debugistrue.- The environment is not
production.
The third cannot be overridden by any config key. Mekhat also needs
udjat.enabled: true — Udjat's request watcher is what opens the batch
Mekhat renders — and warns by name, loudly, when it is missing, because the
symptom otherwise is a bar that renders and is permanently empty. Pair it
with store: false on Udjat to get collection with nothing written to disk.
What it does #
- Injects a bar into every HTML response, and stands up a standalone
console page at
/_debugbarfor an API-only app. - Every response carries an
X-Debugbar-Idheader — Udjat's ownbatch_id, so acurland the Udjat panel agree on what to search for. maat debugbartails a running server's requests in the terminal, with--url,--filter,--slow, and--verbose.Bar.info(value, {label})andBar.measure/Bar.measureSynclet your own code add a message or a timed span to the bar — safe to leave in committed code; each is a no-op costing one field read when the bar is off.- Panels: request, route, auth, plus one per recorded entry type — query, log, event, view, model, exception, mail, notification, message, and timeline.
- Every route but the two static asset routes is behind a loopback guard,
refusing anything outside
127.0.0.1/::1/localhostandallowed_ipswith a403.
Full guide: docs/mekhat.md.