logbook icon indicating copy to clipboard operation
logbook copied to clipboard

feat(logbook-core): correlationId supplier

Open azakrytnoi opened this issue 3 years ago • 0 comments

Use correlationId supplier to allow defered evaluation of correlationId

Description

Precorrelation object is created at the very beginning of the process, in Netty pipeline body is not yet read. It's not used in pairing of request and response, and only used in writing stage. Writing stage is evaluated after request body is read from Netty channel. Currently Precorrelation contains direct string value for correlationId, which makes it impossible to use any information from the request body in generation of correlationId.

Motivation and Context

Types of changes

SOAP messages contains information essential for process correlation in SOAP:HEADER/, which is part of HTTP body. In Micronaut, HTTP request is read in several steps, and with current implementation HTTP request body is not yet retrieved from Netty channel. Proposed change is essential for SOAP processing and is transparent for other protocols. Correspond issue: https://github.com/zalando/logbook/issues/1274

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I have added tests to cover my changes.

azakrytnoi avatar Feb 09 '22 13:02 azakrytnoi