-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Bug Report
Current Behavior
When creating a child span from a parent trace context, the parent Observation was being associated with the new Observation object after its creation. This meant that the LettuceObservationContext was not aware of the parent during the creation process, and any ObservationConvention logic that relied on the parent's presence in the context would fail.
Input Code
Input Code
@Bean
protected ObservationPredicate observationPredicate() {
return (name, context) -> {
if (context instanceof LettuceObservationContext) {
// currently context.getParentObservation() is always null.
return context.getParentObservation() != null;
}
};
}
Expected behavior/code
context.getParentObservation()
returns the parent observation.
Environment
- Lettuce version(s): 6.5.5.RELEASE
- Redis version: 7.2.5
Possible Solution
Preparing context before creating observation.