Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): stop tracing project enrichment cache reads #29640

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/29640/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 52 additions and 48 deletions.

x
0 of 1 viewed, 1 left
52 additions and 48 deletionsapps/server/src/project/ProjectEnrichmentService.tsModified
View file
@@ -210,63 +210,67 @@
{ concurrency: "unbounded", discard: true },
​
- const requestLane = Effect.fn("ProjectEnrichmentService.requestLane")(function* (
+ // Every project read lands here; only an actual enqueue gets a span, the resolve workers trace the work.
+ const requestLane = Effect.fnUntraced(function* (
lane: EnrichmentWorkLane,
workspaceRoot: string,
field: "repositoryIdentity" | "faviconPath",
) {
if (!(yield* reservePending(lane, workspaceRoot))) return;
- if (!(yield* Queue.offer(lane.queue, workspaceRoot))) {
- yield* removePending(lane, workspaceRoot);
- yield* Effect.logWarning("Project metadata enrichment queue is full", {
- workspaceRoot,
- field,
- });
- }
+ yield* Effect.gen(function* () {
+ if (!(yield* Queue.offer(lane.queue, workspaceRoot))) {
+ yield* removePending(lane, workspaceRoot);
+ yield* Effect.logWarning("Project metadata enrichment queue is full", {
+ workspaceRoot,
+ field,
+ });
+ }
+ }).pipe(Effect.withSpan("ProjectEnrichmentService.requestLane"));
});
​