[go: up one dir, main page]

Create development doc on audit event instrumentation

Problem to solve

There are (currently) three ways of instrumenting audit events.

  • Create a new class in ee/lib/ee/audit/ extending AuditEventService
  • Call AuditEventService after a successful action
  • Call Gitlab::Audit::Auditor.audit passing an action block

This disparity leads to unexpected bugs, increased maintain effort and worsen developer experience.

Proposal

Document one recommended way to instrument new audit events. I propose promoting Gitlab::Audit::Auditor.audit as our preferred option and include some (code) examples.

Edited by Tan Le