Tracing Slowdown: OpenTelemetry In SvelteKit Made Easy
summary
Shows how to add OpenTelemetry to a SvelteKit app end to end: installs core, web and Node SDKs, registers an OTLP exporter, and instruments the client via hooks.client.ts and the server via the Node SDK plus the import-in-the-middle hook (requires the d-imp import flag). Traces send to Jaeger; a captured request takes 8.5s and reveals repeated SQL calls—an N+1 queries bug. Proposes two SvelteKit fixes: a dedicated instrumentation.server.ts and emitting diagnostic messages; a proof‑of‑concept PR exists.
AI-written summary · about
