Skip to content

Commit 0aa4282

Browse files
perf(cursor): stop tracing the per-event account usage hash
Cursor usage scans hash every billed event, and each hash was its own `accountHash` span: about 3,800 spans per scan on dev servers. Make it untraced; `readCursorAccountUsage` and `CursorAccountUsage.readPage` still trace the scan. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 9e85538 commit 0aa4282

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/provider-cursor/src/server/accountUsage.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ const billedEventIdentity = (...fields: readonly unknown[]) => JSON.stringify(fi
5858

5959
const textEncoder = new TextEncoder();
6060

61-
const accountHash = Effect.fn("accountHash")(function* (value: string) {
61+
// Untraced: each usage scan hashes every billed event.
62+
const accountHash = Effect.fnUntraced(function* (value: string) {
6263
const digest = yield* Digest.Digest;
6364
return Hex.encode(yield* digest.digest(Digest.sha256, textEncoder.encode(value)));
6465
});

0 commit comments

Comments
 (0)