View Source EventRelay.Audit (eventrelay_client v0.1.0)

Send audit logging events to EventRelay

Summary

Functions

Log an event to the audit log in EventRelay

Functions

Link to this function

log(context, opts \\ [])

View Source

Log an event to the audit log in EventRelay

## Options

  • :topic - The name of the topic in EventRelay that you want to log your audit log events to. It defaults to audit_log so make sure that topic is setup in EventRelay or override it with a topic that is setup in EventRelay. The default value is "audit_log".

  • :name - Required. A name for the event that triggered an entry in the audit log.

  • :description - Required. A description of the event that triggered an entry in the audit log.

  • :user_id - Required. This is the ID of the user or actor that triggered the event.

  • :reference_key - Required. This is the ID of the target object/resource that is being changed

  • :group_key - Required. This is a value used to track the organization, tenant, team, account that this is related to.

  • :data (map/0) - This is any data that you want to store about the state of the system at the time the event occurred.

  • :context (map of String.t/0 keys and String.t/0 values) - In the context you can provide data like IP address, server ID, cloud region, etc. The default value is %{}.

  • :source - The source of the event being sent to the audit log like application name. The default value is "EventRelay Client".

  • :occurred_at -