import {startPair} from './processes.mjs';
const pair=await startPair({directory:'records/current',endpoint:process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||''});
console.log('Checkout: '+pair.checkoutURL+'/demo?scenario=distributed');
console.log('Pricing health: '+pair.pricingURL+'/health');
console.log('Ctrl+C finishes active requests and flushes SDK batches.');
let closing=false;async function stop(){if(closing)return;closing=true;await pair.stop();console.log(JSON.stringify({shutdown:pair.stops}));}
process.on('SIGINT',()=>stop().catch(e=>{console.error(e.message);process.exitCode=1;}));process.on('SIGTERM',()=>stop().catch(e=>{console.error(e.message);process.exitCode=1;}));
