16 lines
319 B
JavaScript

const conversationId = req.body.conversationId;
const startTime = req.body.startTime;
(async () => {
try {
const span = await latencySpan().startSpan(conversationId, startTime);
res.send(span);
} catch (error) {
console.log(error.message);
res.send({
error: error.message,
});
}
})();