Skip to content

Using MDC (Mapped Diagnostic Context) to improve logging #37

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

Closed
csviri opened this issue Aug 21, 2019 · 2 comments · Fixed by #642
Closed

Using MDC (Mapped Diagnostic Context) to improve logging #37

csviri opened this issue Aug 21, 2019 · 2 comments · Fixed by #642
Assignees
Milestone

Comments

@csviri
Copy link
Collaborator

csviri commented Aug 21, 2019

In order to make it easy to work with logs, thus correlate log messages within an operator (1 process) we could add "correlation ids" or data (note this is not the same as we add correlation IDs in distributed systems) or more like the mapped diagnostic context:
see: https://www.baeldung.com/mdc-in-log4j-2-logback
to the logs. So we can correlate logs for the custom resource, but also for a reconciliation execution path. Note that this involves multiple threads, so its not just using directly MDC.

So we can add to for every log message with MDC:

  • resource uuid
  • resource version
  • generated uuid for every reconciliation (so we can see which log messages are related to a particular reconciliation)
@csviri csviri added the v1 label Aug 21, 2019
@csviri csviri removed the v1 label Dec 19, 2019
@csviri csviri added the feature label Apr 20, 2020
@metacosm
Copy link
Collaborator

What is this about? Could you add more details, please or close this issue?

@metacosm metacosm reopened this Jul 12, 2021
@csviri csviri changed the title Correlation ID Support Using MDC (Mapped Diagnostic Context) to improve logging Jul 15, 2021
@csviri
Copy link
Collaborator Author

csviri commented Jul 15, 2021

added describtion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants