Fix key collisions in log messages
What does this MR do and why?
When searching for logs in Elastic there were some that we not found. Upon further investigation, it appeared that this was due to a key conflict. There are nested values under json.user
(i.e. json.user.ip_address
, json.user.username
), and when messages were logged with a string value assigned to json.user
they were not searchable in Elastic. Changing the key names in this MR resolved the problem of logs not being found in Elastic so I applied the same changes here.
Closes: https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/614
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.