Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mafredri opened this issue Feb 11, 2025 · 0 comments
Open

Comments

@mafredri
Copy link
Member

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant