Skip to content

Add logs to track audit event type and its scope

What does this MR do and why?

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Perform any action that creates an audit event.
  2. View logs similar to below in application_json.log
{"severity":"INFO","time":"2024-02-02T17:44:18.850Z","correlation_id":"01HNNEQPTFKX6EFKWMH22SR0WB","meta.caller_id":"PUT /api/:version/projects/:id/merge_request_approval_setting","meta.remote_ip":"127.0.0.1","meta.feature_category":"source_code_management","meta.user":"root","meta.user_id":1,"meta.project":"flightjs/blank-project","meta.root_namespace":"flightjs","meta.client_id":"user/1","message":"Event type and scope","event_type":"project_merge_requests_author_approval_updated","scope":"Project"}

{"severity":"INFO","time":"2024-02-02T17:45:47.164Z","correlation_id":"01HNNETDAWTWGWDDKQFTQ855GR","meta.caller_id":"graphql:unknown","meta.remote_ip":"127.0.0.1","meta.feature_category":"groups_and_projects","meta.user":"root","meta.user_id":1,"meta.client_id":"user/1","message":"Event type and scope","event_type":"destroy_compliance_framework","scope":"Group"}

{"severity":"INFO","time":"2024-02-02T17:51:24.000Z","correlation_id":"e93f1d9c3bfaa5e879d595542b6c1060","message":"Event type and scope","event_type":"email_created","scope":"User"}

Related to #439942 (closed)

Edited by Huzaifa Iftikhar

Merge request reports