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

Request correlation #3426

Merged
merged 2 commits into from
Sep 22, 2021
Merged

Conversation

tomas-langer
Copy link
Member

@tomas-langer tomas-langer commented Sep 20, 2021

Added better correlation to webserver requests for troubleshooting purposes.

  1. logging remote address
  2. logging requested path
  3. logging request id
  4. logging scope id (io.helidon.common.Context)
  5. added MDC support with scope id registered under io.helidon.scope-id in ForwardingHandler)
  6. using the same channel ID as Netty uses in its own logs

Now it is much easier to map client requests (such as from curl debug or TCP dump) to web server requests and to their processing in Helidon.

Adds helidon-logging-common dependency to webserver. To use this feature, one of the logging modules must be used (such as helidon-logging-jul) and configuration modified (see examples for logging).

@tomas-langer tomas-langer self-assigned this Sep 20, 2021
@tomas-langer tomas-langer force-pushed the request-correlation branch 2 times, most recently from d06dbf8 to 109e6b6 Compare September 20, 2021 12:33
@tomas-langer tomas-langer marked this pull request as draft September 21, 2021 11:49
@tomas-langer tomas-langer marked this pull request as ready for review September 21, 2021 14:29
@tomas-langer tomas-langer added this to the 2.3.4 milestone Sep 22, 2021
@tomas-langer tomas-langer modified the milestones: 2.3.4, 2.4.0 Sep 22, 2021
Using context-id and adding it to MDC.
Using the same channel ID as Netty uses in its logs.
Guarding log statements to prevent capturing lambdas.

Signed-off-by: Tomas Langer <[email protected]>
Signed-off-by: Tomas Langer <[email protected]>
@tomas-langer tomas-langer merged commit 07dfcf0 into helidon-io:master Sep 22, 2021
@tomas-langer tomas-langer deleted the request-correlation branch September 22, 2021 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants