-
Notifications
You must be signed in to change notification settings - Fork 228
Document MDC log correlation support #724
Document MDC log correlation support #724
Conversation
Signed-off-by: avim <avi.maslati@forescout.com>
4d594f9 to
4971e72
Compare
Codecov Report
@@ Coverage Diff @@
## master #724 +/- ##
============================================
+ Coverage 88.76% 88.98% +0.22%
- Complexity 596 598 +2
============================================
Files 73 73
Lines 2242 2242
Branches 289 289
============================================
+ Hits 1990 1995 +5
+ Misses 159 155 -4
+ Partials 93 92 -1
Continue to review full report at Codecov.
|
yurishkuro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! A few minor suggestions.
jaeger-core/README.md
Outdated
| The Jaeger Java Client also provides log correlation support by configuring the logging context (MDC) | ||
| with the following variables: | ||
|
|
||
| trace id - %{traceId} | ||
| span id - %{spanId} | ||
| sampled - %{sampled} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The Jaeger Java Client also provides log correlation support by configuring the logging context (MDC) | |
| with the following variables: | |
| trace id - %{traceId} | |
| span id - %{spanId} | |
| sampled - %{sampled} | |
| The Jaeger Java Client supports log correlation by updating the logging context (MDC) with three variables: `traceId`, `spanId`, `sampled`. |
jaeger-core/README.md
Outdated
|
|
||
| To accomplish that Jaegar Tracer should be created with the following two steps: | ||
|
|
||
| 1. Create the MDCScopeManager using either default names: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 1. Create the MDCScopeManager using either default names: | |
| 1. Create the MDCScopeManager using either default MDC field names: |
| 2. Create the Jaegar Tracer by supplying the MDCScopeManager created step 1: | ||
| ```java | ||
| JaegerTracer.Builder("serviceName").withScopeManager(scopeManager).build(); | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also add that the log formatter must be configured to include MDC fields in the output. Show example of the formatter for, say, log4j, and include a sample output log line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback!
yurishkuro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Which problem is this PR solving?
documentation for #718
Short description of the changes
add documentation for log correlation