diff --git a/third-party/thrift/src/thrift/lib/java/runtime/src/main/java/com/facebook/thrift/util/resources/ContextPropagationRegistry.java b/third-party/thrift/src/thrift/lib/java/runtime/src/main/java/com/facebook/thrift/util/resources/ContextPropagationRegistry.java index ae29b11df2e982..bfc2f61a5714f7 100644 --- a/third-party/thrift/src/thrift/lib/java/runtime/src/main/java/com/facebook/thrift/util/resources/ContextPropagationRegistry.java +++ b/third-party/thrift/src/thrift/lib/java/runtime/src/main/java/com/facebook/thrift/util/resources/ContextPropagationRegistry.java @@ -45,7 +45,7 @@ public static void registerContextPropagationKey(String key) { // Register `ContextPropRunnable` and `ContextPropSubscriber` on first invocation. if (!hooksRegistered) { Schedulers.onScheduleHook("context.propagation", ContextPropRunnable::new); - Hooks.onEachOperator( + Hooks.onLastOperator( Operators.lift((scannable, subscriber) -> new ContextPropSubscriber<>(subscriber))); hooksRegistered = true; }