-
Notifications
You must be signed in to change notification settings - Fork 125
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
Print authentication error stack-trace in INFO level #2080
Labels
Comments
4 tasks
Tried this out for fun. Now a healthy, functioning k8s authenticator log looks like:
and the logs when there is an authn error look like this (in this flow, the authenticator service isn't enabled on the server, eg CONJUR_AUTHENTICATORS isn't set correctly):
In particular, with the server running in
💥 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have a lot of cases where the customer has an authentication error
and the log level is set to INFO. In such cases, the log will show the
following:
Although we print the actual error, it sometimes doesn't help enough and we want to view the
stack trace. This requires the customer to set the log level to DEBUG and re-run the request.
Also - sometimes it adds another cycle in which we ask for debug logs.
Furthermore, the stack trace that is written in DEBUG logs is quite hard to read:
The output above actually includes 2 stack traces - one of the original error, and one of the error that we raise
in the authenticate_controller and is printed in the application_controller. We can improve our supportability by
printing the original stack trace in info level:
Still, this has some clutter and we would not want the info log (which is the default one) to include so many
lines. However, we can achieve a better output by printing only the stack trace of our app, beginning in our
code. This can be done by printing the stack trace in INFO level while printing in DEBUG level once we hit the ruby gems level. Such a log will
look like this:
The output above has the authentication error, it has a minimal stack trace that can help us (or the customer) understand the
issue easily, and it is not very long and thus doesn't add too much to the defaut INFO log.
The text was updated successfully, but these errors were encountered: