fishey2 / java-component-template

A template project for Java based projects with Spring Boot 2, Gradle, Logback and JUnit5
MIT License
7 stars 0 forks source link

Implement strategy for Correlation ID #7

Open fishey2 opened 4 years ago

fishey2 commented 4 years ago

For inbound request handling we want to be able to keep track of each request in the logs via a Correlation ID, this means that we would need to do the following:

Acceptance Criteria:

Given that the Spring App is running When I call the /message endpoint without a Correlation-Id header Then one is created and returned in the response headers

Given that the Spring App is running When I call the /message endpoint with a Correlation-Id header Then it is returned in the response headers

Given that the Spring App is running When I call the /message endpoint with a Correlation-Id header Then the correlation-id is added as a field in the JSON log output

fishey2 commented 4 years ago

Additional:

Remove MDC parameter after request has been released?