(status?: number)
| 67 | headers.set("traceparent", `00-${traceId}-${randomBytes(8).toString("hex")}-01`); |
| 68 | const at = Date.now(); |
| 69 | const finish = (status?: number) => |
| 70 | appendTraces(sink.runDir, [ |
| 71 | { |
| 72 | id: traceId, |
| 73 | at, |
| 74 | url, |
| 75 | ms: Date.now() - at, |
| 76 | ...(status === undefined ? {} : { status }), |
| 77 | source: "terminal" as const, |
| 78 | label: rpcLabel(init?.body), |
| 79 | }, |
| 80 | ]); |
| 81 | try { |
| 82 | const response = await original(input, { ...init, headers }); |
| 83 | finish(response.status); |
no test coverage detected