Skip to content
9 changes: 8 additions & 1 deletion src/build/virtual/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@ export default function tracing(nitro: Nitro) {
imports.push(`import { tracingPlugin as srvxTracing } from "srvx/tracing";`);
}
if (h3) {
imports.push(`import { tracingPlugin as h3Tracing } from "h3/tracing";`);
imports.push(
`import { tracingPlugin as h3Tracing, wrapFindRouteWithTracing } from "h3/tracing";`
);
setup.push(` h3Tracing()(nitroApp.h3);`);
setup.push(` if (nitroApp.h3["~findRoute"]) {`);
setup.push(
` nitroApp.h3["~findRoute"] = wrapFindRouteWithTracing(nitroApp.h3["~findRoute"]);`
);
setup.push(` }`);
Comment thread
pi0 marked this conversation as resolved.
Outdated
Comment thread
pi0 marked this conversation as resolved.
Outdated
}

return [
Expand Down
Loading