Skip to content

Modify exception logging mechanism in U2fRegistration's callback

Manoj M J requested to merge mmj-u2f-exception-logging into master

What does this MR do and why?

The original implementation of the logging in this callback was done in !51447 (merged).

But even after its deployment, we noticed that we could not find any details being logged in Kibana from this callback, even when we were sure that exceptions were being thrown.

In the past few days, I was in the process of figuring out the cause of this callback failing to create records in some cases.

While we found the root cause of the exception and fixed it, we still could not figure out why the logs of these errors were not appearing in Kibana. (My hunch at this point is that the schema of these errors does not match previous occurrences, and hence the whole log lines are being dropped as mentioned here, but this hypothesis needs further study.)

Anyway, while I was reading thru the details of how to log errors and exceptions, I noticed that our recommended way of doing this is via Gitlab::ErrorTracking as mentioned here.

So, it appears that the right thing to do here so as to fix the problem AND to adhere to our developer guidelines is to change the exception tracking mechanism in this callback to make use of Gitlab::ErrorTracking, which is what this MR does.

(no Changelog added as this is only an internal detail)

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

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

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Manoj M J

Merge request reports

Loading