Skip to content

Add correlation id to log messages in WebFlux [SPR-16966] #21504

@spring-projects-issues

Description

@spring-projects-issues

Rossen Stoyanchev opened SPR-16966 and commented

In order to improve logging for WebFlux requests, as part of #21437, e.g. to avoid duplicate information (e.g. request path) being logged multiple times, log messages for a given request need to insert a common log id, so that the messages can be correlated regardless of the thread id.

This can be done be exposing a well-known request attribute via ServerWebExchange and a convenience method on ServerWebExchange to access it.


Affects: 5.0.7

This issue is a sub-task of #21485

Issue Links:

Referenced from: commits bc3cf0e, 39d5874, 5dc49b1, fd90b73, 8231066, 5cdc267

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: taskA general task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions