This hits real pain points. Querying audit logs is always the worst part. Curious what’s your storage strategy behind the scenes? Append-only or something more custom?
nerv-audit
2 Comments
@[Barry]
Yeah—querying audit logs is usually where things start to hurt
For nerv-audit, I’m currently using a vertical (per-entity) audit table strategy, which is essentially how Hibernate Envers structures things under the hood.
So instead of a single append-only log, each audited entity gets its own audit table (e.g., order_aud, user_aud). Every change creates a new revision entry, and revisions are tracked separately. This keeps writes simple and consistent with the ORM model, while making it easier to query history for a specific entity.
It’s not a pure append-only event log in the “event sourcing” sense—but it is still append-only at the row level (no updates, just new revisions). The trade-off is that cross-entity queries can get more complex, which is where most of the friction comes in.
That’s actually one of the areas I’m trying to improve with nerv-audit—making those queries more ergonomic without forcing teams into a completely different storage model.
Curious as well—have you seen teams lean more toward centralized append-only logs, or stick with per-entity history like this?
PS: I attached a screenshot of a vertically stored revision in the nerv-audit demo project.
Please log in to add a comment.
This is a great example of when “default tools” stop being enough.
Envers works fine when audit is just a compliance checkbox, but the moment you actually need to use audit data, the cracks show fast — especially around querying and cross-service consistency.
The shift you made (audit as a domain, not a side-effect) feels like the real takeaway here. Once audit becomes something product or ops relies on, the model and query layer matter way more than just capturing snapshots.
The query abstraction you showed is interesting too — it moves audit from “logs you dig through” to “data you can ask questions from,” which is a big shift.
Curious how you’re handling write overhead and storage growth with field-level tracking at scale?
Please log in to add a comment.
Please log in to comment on this post.
More Posts
- © 2026 Coder Legion
- Feedback / Bug
- Privacy
- About Us
- Contacts
- Premium Subscription
- Terms of Service
- Refund
- Early Builders
Related Jobs
- Full Stack Java/Go Developer (Bilingual English/Spanish)Dev Technology · Full time · Arlington, VA
- Language Data Annotator ( Spanish)Innova software Services Inc · Full time · Canada
- Language Data Annotator ( Spanish)Innova software Services Inc · Full time · Canada
Commenters (This Week)
Contribute meaningful comments to climb the leaderboard and earn badges!