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

#1739 provide the traceparent header as MDC value in logs #1740

Merged
merged 5 commits into from
Sep 19, 2023

Conversation

thjaeckle
Copy link
Member

  • generify the fields to provide to the MDC in CommonMdcEntryKey enum
  • rename "x-correlation-id" in logs to just "correlation-id"
  • exchange some places where only correlationId was extracted from a map of headers with parsing all the headers for MDC worthy fields

Resolves: #1739

@thjaeckle thjaeckle added this to the 3.4.0 milestone Sep 8, 2023
@thjaeckle thjaeckle force-pushed the feature/log-tracing-context branch 6 times, most recently from ad15325 to 7635ddb Compare September 11, 2023 11:59
@thjaeckle
Copy link
Member Author

@alstanchev this PR would also be cool to be included in 3.4.0
I mentioned it briefly in today's Ditto community meeting, it provides the traceparent of W3C Trace Context as MDC value in a generic way - similar to providing the correlationId.

I could simplify the loggers also quite a bit.

I also fixed that the traceparent header coming via an HTTP request was not used/forwarded.

@alstanchev
Copy link
Contributor

alstanchev commented Sep 11, 2023

I have mentioned the #1739 issue or do you want the PR to be mentioned specifically?

@thjaeckle
Copy link
Member Author

I have mentioned the #1739 issue or do you want the PR to be mentioned specifically?

When there is an issue and a PR I normally only mention and link the issue ;)

I also pinged you about reviewing, but you're right .. release notes would also be good - I could also do that however..

@thjaeckle thjaeckle self-assigned this Sep 14, 2023
* generify the fields to provide to the MDC in CommonMdcEntryKey enum
* rename "x-correlation-id" in logs to just "correlation-id"
* exchange some places where only correlationId was extracted from a map of headers with parsing all the headers for MDC worthy fields

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
… level as "intLevel"

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
…ent-span-id"

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
@thjaeckle thjaeckle force-pushed the feature/log-tracing-context branch from 210d81d to 707c773 Compare September 18, 2023 16:02
… chart

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
@thjaeckle
Copy link
Member Author

@alstanchev @kalinkostashki Could you please have a look? Still missing an approval here .. :)

@alstanchev
Copy link
Contributor

i am on it

Copy link
Contributor

@alstanchev alstanchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thjaeckle thjaeckle merged commit e5f32fd into master Sep 19, 2023
2 checks passed
@thjaeckle thjaeckle deleted the feature/log-tracing-context branch September 19, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Improve logging by adding the W3C traceparent header as MDC field to logs
2 participants