Skip to content

Allow searching audit logs for "additional fields" values, e.g. workspace ID #16524

@mafredri

Description

@mafredri

Random thought. We have AdditionalFields. Could we just add a custom query option to GetAuditLogsOffset that searches audit logs by their json body payload for the workspace id? Would that be too slow? Should we just add another column and allow a workspace_id for audit logs?

Originally posted by @Emyrk in #16507 (review)


Since it's possible to create indexes on jsonb fields, we could ensure good response time for the searches as well. For instance:

CREATE INDEX ON audit_logs((additional_fields->>'workspace_id')::uuid);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions