The best way to control Claude Code, Codex and more from any computer or phone
perf(server): stop tracing per-event live coalescer work (#29758)
Co-authored-by: Taylor Dolezal <117500+onlydole@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Taylor Dolezal committed
Nov 3, 2026 at 15:40 UTC
93b0db1bc826fddc41a493b0f87a04dabf60801c
1 file changed
+4
-5
apps/server/src/orchestration-v2/ThreadLiveEventCoalescer.ts
+4
-5
@@ -95,7 +95,8 @@ export const makeThreadLiveEventCoalescer = Effect.fn(
95
let windowFiber: Fiber.Fiber<void, never> | null = null;
96
let closed = false;
97
98
- const cancelWindow = Effect.fn("ThreadLiveEventCoalescer.cancelWindow")(function* () {
98
+ // cancelWindow/flushPending/offerAll run per live event or batch; sub-ms spans here would flood the rotating trace.
99
+ const cancelWindow = Effect.fnUntraced(function* () {
100
const fiber = windowFiber;
101
if (!fiber) {
102
return;
@@ -104,7 +105,7 @@ export const makeThreadLiveEventCoalescer = Effect.fn(
105
yield* Fiber.interrupt(fiber);
106
});
107
107
- const flushPending = Effect.fn("ThreadLiveEventCoalescer.flushPending")(function* () {
108
+ const flushPending = Effect.fnUntraced(function* () {
109
if (pendingUpdates.length === 0) {
110
return;
111
}
@@ -135,9 +136,7 @@ export const makeThreadLiveEventCoalescer = Effect.fn(
136
137
// Keep each source batch together so a synchronization marker cannot pass
138
// events already pulled from PubSub but still being coalesced.
138
- const offerAll = Effect.fn("ThreadLiveEventCoalescer.offerAll")(function* (
139
- inputs: ReadonlyArray<ThreadLiveInput>,
140
- ) {
139
+ const offerAll = Effect.fnUntraced(function* (inputs: ReadonlyArray<ThreadLiveInput>) {
140
yield* mutex.withPermits(1)(
141
Effect.forEach(
142
inputs,