orisintel/laravel-process-stamps
Laravel Process Stamps adds lightweight provenance to Eloquent models, automatically recording the command, job, request, or test that created or updated each record. Trace data changes, debug background workflows, and answer "where did this row come from?" with minimal setup.
Architecture fit. Process Stamps is an Eloquent event-sidecar: it hooks created/updated, resolves the current execution context (HTTP request, artisan command, queued job, scheduler), and writes that context into columns on the model's own row. That is a clean fit for Laravel monoliths and modular monoliths where Eloquent is the only write path and there is no existing row-level provenance. It is a poor fit where writes arrive via DB::table() bulk inserts/upserts, raw SQL, queue consumers outside Laravel, ETL jobs, or another service sharing the database — those writes will silently carry no stamp, which is worse than no feature at all because it creates false confidence in an audit or forensics workflow. Treat coverage, not capability, as the gating question.
Scope framing for product. The package records which process wrote a row (request / command / job / scheduler, plus an identifier), not which person. If the underlying requirement is "who changed this record" in a compliance or customer-facing sense, this is a correlation aid that still needs request-ID-to-user mapping in your logs, not a solution. If the requirement is "why did this row change and which deploy/command/job did it," it is a genuinely cheap win. Get that distinction written down before it enters a roadmap as "audit logging."
Integration feasibility. Mechanically easy: composer require, publish config, add the stamp columns to each opted-in table via migration, add HasProcessStamps to the model. No service provider gymnastics, no schema ownership, MIT licensed. The effort is not in the code, it is in the surface area: one migration and one index decision per stamped table, plus a decision about which models are worth stamping at all.
Technical risk.
schedule:run, and Octane keep processes alive across many units of work. If context is resolved once at boot or not reset between jobs, stamps will be plausible-looking but wrong — the most expensive failure class for this kind of tool. This must be validated empirically, not read off the README.Key questions.
Stack fit. Good for a Laravel application on a supported PHP version with Redis/MySQL/Postgres, an Eloquent-dominant data layer, and a support or platform team that already debugs from logs and request IDs. It slots in alongside existing observability rather than replacing it: stamps answer "which process touched this row," logs and tracing answer "what else was happening at the time." The two are more useful together than either alone, which is a reasonable pitch — but do not let it be sold as a replacement for structured logging or tracing.
Buy vs. build. Be honest internally: the durable surface here is a model observer plus a context resolver, on the order of a few hundred lines. With a 2021 last release, the "buy" argument is not engineering effort saved — it is near zero. The real reason to adopt is speed-to-value on an existing Laravel 6/7/8 application where the constraint already resolves. The real reason to build is that you need it on Laravel 11/12, need coverage for non-Eloquent writes, or need user attribution. Decide which of those is true before writing a ticket.
Migration path. Pin the exact version. Publish config and review it. Add nullable stamp columns (type, name, identifier — with names matching your org's conventions rather than the package defaults, since these will be read by humans under pressure) to one low-risk model first. Deploy. Verify stamps are correct for a request, a command, a queued job, and a scheduled task — all four, because that is where the context-resolution bugs live. Only then expand to a second and third model. Historical rows will be null forever; state that expectation to stakeholders up front so no one asks for a backfill.
Compatibility. Two layers to check: package-to-framework (Composer constraints), and data-to-schema (column name collisions with existing created_by/updated_by conventions, and whether any existing code already writes those columns). If your models already have audit-ish columns, adding these alongside them creates a two-truths problem that will confuse support — either migrate the old columns out of the read path or don't stamp those models.
Sequencing.
The failure mode to avoid is a broad, cheap rollout across every model — that maximizes write overhead and index bloat while producing a set of stamps nobody has a workflow for.
Maintenance. Two distinct burdens. First, package maintenance: unmaintained since 2021, so you own compatibility with future Laravel majors whether you plan to or not. Budget for a fork decision at the next framework upgrade rather than being surprised by it. Second, schema maintenance: every new model that should be stamped needs a migration and an index decision, and that will not happen on its own — it needs to be in the model-creation checklist or it will decay into partial coverage within two quarters.
Support. This is where the value shows up and where the runbook matters. Support and on-call need to know: what a null stamp means (write did not come from an instrumented path, or predates the feature), what a scheduler stamp means, how to turn a process identifier into a human (log correlation), and that a stamp is evidence of a process, not proof of a person. A one-page runbook is sufficient and should be written during rollout, not after the first confusing ticket. Also brief support that stamps are not tamper-evident — anyone with SQL access can change them — so they should not be quoted as authoritative in a dispute.
Scaling. Cost profile is mild but real and permanent: additional columns on every insert and update, additional index maintenance on every write to stamped tables, and unbounded row growth that is not archivable independently of the row. On a high-write table (event logs, counters, session-ish rows), stamping is almost certainly not worth it — exclude those explicitly. On low-to-moderate-write business tables (orders, subscriptions, accounts, config records), the cost is negligible and the diagnostic return is high. The scaling decision is therefore per-model, not per-application, and should be documented as an allowlist rather than left to whoever adds the next trait.
Failure modes.
Ramp-up. Low for engineers — it is a trait and a migration, learnable in an afternoon. The ramp-up that actually matters is on the consumption side: support, QA, and analysts need to be taught what a stamp does and does not prove. Budget more time for that half-hour briefing than for the implementation, because the risk is not that the team can't install it — it's that someone reads a stamp as a definitive audit record six months from now and makes a decision on it.
How can I help you explore Laravel packages today?