Skip to content
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

Include more context in log messages #1806

Open
baszoetekouw opened this issue Feb 11, 2025 · 2 comments · May be fixed by #1782
Open

Include more context in log messages #1806

baszoetekouw opened this issue Feb 11, 2025 · 2 comments · May be fixed by #1782

Comments

@baszoetekouw
Copy link
Member

Currently, no context is logged in exceptions logs, for example:

Jan 29 11:33:00 docker6.prd.utr.surfconext.nl engineblock[821]: {"channel":"app","level":"DEBUG","message":"Caught Exception \"OpenConext\\EngineBlockBundle\\Exception\\StuckInAuthenticationLoopException\":\"More than the configured maximum authentication procedures for the current user from SP \"https://connect.surfconext.nl\" occurred within the configured amount of seconds, the user seems to be stuck in an authentication loop.  Aborting the current authentication procedure.\", redirecting to route \"authentication_feedback_stuck_in_authentication_loop\"","context":[],"extra":{"session_id":"faeef602be26d63b285e258a82a10e0b","request_id":"679a03dc5876d"}}
Feb 11 10:35:52 docker10.prd.utr.surfconext.nl engineblock[779]: {"channel":"app","level":"DEBUG","message":"Caught Exception \"EngineBlock_Corto_Module_Services_SessionLostException\":\"Trying to find an AuthnRequest (we made and sent) with id \"CORTObc9458f53ba0c1220cf9e7f8a93c6c6a543f6c4d\" but it is not known in this session. Likely the user lost their session.\", redirecting to route \"authentication_feedback_session_lost\"","context":[],"extra":{"session_id":"689404d72e59645c3184d1e00f36a8b3","request_id":"67ab19f84c54f"}}
Feb 11 01:20:35 docker10.prd.utr.surfconext.nl engineblock[779]: {"channel":"app","level":"DEBUG","message":"Caught Exception \"EngineBlock_Corto_Module_Bindings_Exception\":\"Unsolicited assertion (no InResponseTo in message) not supported!\"","context":[],"extra":{"session_id":"68e37673c4f17823b0ddca961a17e39f","request_id":"67aa97d3d8858"}}

In all of these cases, it would be very useful to have some basic information of the issuer and nameid from the request, and if known, the SP the user is heading to.

@tvdijen
Copy link
Contributor

tvdijen commented Feb 11, 2025

Same issue, different exception: #1782

@baszoetekouw baszoetekouw changed the title Include more conext in exception logs Include more context in exception logs Feb 12, 2025
@baszoetekouw baszoetekouw linked a pull request Feb 12, 2025 that will close this issue
@baszoetekouw baszoetekouw linked a pull request Feb 12, 2025 that will close this issue
@baszoetekouw
Copy link
Member Author

Ah, the issue @tvdijen raises in #1782 is even more generic: this also applies to regular notices and debug messages, which typically also need context to the actionable.

@baszoetekouw baszoetekouw changed the title Include more context in exception logs Include more context in log messages Feb 12, 2025
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

Successfully merging a pull request may close this issue.

2 participants