Closed
Description
Currently LettuceObservationContext.getParentObservation()
rely on micrometer default implementation, which get current observation from ThreadLocal
, but lettuce is executed in its own thread other than parent observation's thread, which lead to LettuceObservationContext.getParentObservation()
be null even it called within a parent observation scope, LettuceObservationContext.setParentObservation()
should be called before observation created, then we could use LettuceObservationContext.getParentObservation()
in ObservationPredicate
, see also micrometer-metrics/micrometer#3867.