Skip to content

Audit Events Are Written in the Same Transaction as Business Logic #203

@chintakjoshi

Description

@chintakjoshi

Audit Events Are Written in the Same Transaction as Business Logic

Files: auth.py:432-478, lifecycle.py:100-143

Audit records are awaited in the same request path as login/signup. If the audit service or DB is slow, it directly impacts authentication latency. Audit writes should be fire-and-forget or queued asynchronously (similar to how webhook emission already uses a separate session factory).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions