Logging Correlation Id Pattern


(Rodrigo Jorge Ribeiro) #1

http://www.dev-garden.org/2015/11/28/a-recipe-for-microservice-correlation-ids-in-java-servlets/

how can i implement this pattern in lagom without polluting all my method signatures with the correlation id ?


(Alan Klikic) #2

@RJrodrigo check this.
This will also apply for Lagom


(Rodrigo Jorge Ribeiro) #3

I am using Lagom java, does the MDC propagate in CompletableFutures or in Vavr Futures.
If a thread is serving multiple requests wouldn’t the MDC values get lost.
Is there a example project ?


(Alan Klikic) #4

@RJrodrigo i did not use this yet so do not have any practical feedback
Also I’m nor aware of any example project.
But from the doc i believe it should be rather simple to test integrate it and test it


(Ignasi Marimon-Clos) #5

This is perfect timing as we’ve just merged a Lagom recipe demonstrating the capabilities of Lightbend’s Telemetry (Cinnamon) in Lagom.

I’m not 100% up to date with Lightbend’s Telemetry (Cinnamon) roadmap but I think CompletionStage (or CompletableFuture) are still not supported. I might be wrong.