The ShouldSample loop at signal/trace/composite_sampler.go:36-41 only short-circuits on Drop. For non-Drop decisions, the last sampler's result wins. This means if sampler A returns RecordOnly and sampler B returns RecordAndSample, the final result is RecordAndSample — the earlier restriction is silently overridden. The existing tests don't cover this case (the "mixed decisions" test has a Drop in the middle which short-circuits before this interaction matters). If the intended semantics are AND-like (any sampler can restrict but not upgrade), this behavior is incorrect. If the intent is pipeline/last-wins semantics, it's fine but worth documenting.
The
ShouldSampleloop atsignal/trace/composite_sampler.go:36-41only short-circuits onDrop. For non-Drop decisions, the last sampler's result wins. This means if sampler A returnsRecordOnlyand sampler B returnsRecordAndSample, the final result isRecordAndSample— the earlier restriction is silently overridden. The existing tests don't cover this case (the "mixed decisions" test has aDropin the middle which short-circuits before this interaction matters). If the intended semantics are AND-like (any sampler can restrict but not upgrade), this behavior is incorrect. If the intent is pipeline/last-wins semantics, it's fine but worth documenting.