udjat 0.1.0
udjat: ^0.1.0 copied to clipboard
Request inspection and observability for Maat applications.
Udjat #
[udjat — Request inspection and observability for Maat applications.]
Request inspection and observability for Maat applications. Udjat is the restored eye: it watches every query, exception, log line, mail, notification, and event a request or a job produced, and correlates them into the one batch that request or job caused.
It records into one table and renders it through a Vizier panel — one panel, one login, one layout, alongside the rest of the admin.
Application.configure(...)
.withExtensions([udjatExtension]) // the recording half
.create();
Panel(..., extensions: [udjatVizier()]); // the panel half
Two opt-ins on purpose: an application may want the recording without the panel, and the panel is the only half that needs Vizier.
What it watches #
Eight types, each attached only when its config key is on: request,
query, exception, job, event, log, mail, and notification.
What it does not do #
Query bindings are stored verbatim — they are positional, so there is no key
name to redact against. Do not enable the query watcher in production
against a database whose parameters carry secrets. Everything else is
redacted at record time, over the whole entry, before it ever reaches the
table. See docs/laravel-differences.md for how this compares to Laravel's
Telescope.
Install #
maat udjat:install # publishes the two panel views
Add ...udjatMigrations to database/migrations.dart, udjatVizier() to
the panel's extensions:, and a config/udjat.dart:
final udjat = {
'enabled': env('UDJAT_ENABLED') == 'true',
'watchers': {'request': true, 'query': true, 'log': true},
};
Off unless the application says otherwise: an observability tool that turns
itself on writes a row per query on the day it is installed. The watchers
map is opt-in and authoritative — a type records only if it is listed
true; omit the key entirely and every type records instead.
Keep the table small #
schedule.command('udjat:prune').daily();
A command, never a timer the package starts on its own, and capped at 87600
hours (ten years) so a mistyped --hours= cannot delete the whole table.
Full guide: docs/udjat.md.