trace() Trace any function
Wrap a handler. Autotel records the spans, the errors, and the request context.
import { trace } from 'autotel';
export const checkout = trace((ctx) =>
async (req, res) => {
const result = await charge(req.body);
return res.json(result);
},
);