Skip to content

Add name field to streaming audit events API

As part of a the update streaming audit event UI styles (Update streaming audit event UI styles (#411005 - closed)) there is a new field to add a name to a destination. This field to help users better distinguish between destinations.

Proposal

Add a field to the streaming audit events destination API called Name. This field is required to add a destination

Update to allow a name field to be provided in the following qraphql queries:

  1. externalAuditEventDestinationCreate
  2. instanceExternalAuditEventDestinationCreate
  3. externalAuditEventDestinationUpdate
  4. instanceExternalAuditEventDestinationUpdate

Design

name-field

Implementation plan

First we can send database MR for both external audit event destination and instance external audit event destination and then we can send another MR to add name field in APIs.

For migration MR we can follow below implementation plan

  1. Introduce a new column name as a string, initially allowing for null values.
  2. Backfill the name field for existing records with the format "Destination_#{record_id}".
  3. Alter the name column to disallow null values.
  4. Add a unique index on the combination of namespace_id and name.
Edited by Harsimar Sandhu