console/scripts/seed-traces/intercept-server.mts
Laurin Quast 4f70fc9555
feat: otel telemetry collection and dashboard (#6796)
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
Co-authored-by: Dotan Simha <dotansimha@gmail.com>
Co-authored-by: Denis Badurina <denis@denelop.com>
2025-10-10 14:06:02 +02:00

10 lines
277 B
TypeScript

import * as http from 'node:http';
import * as foo from '@whatwg-node/server';
const adapter = foo.createServerAdapter(async request => {
console.log(JSON.stringify(await request.json(), null, 2));
return new Response('{}');
});
http.createServer(adapter).listen(9898);