fix(root): add hyperdx and better logging

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-13 21:49:51 +02:00
committed by Carl-Gerhard Lindesvärd
parent 4bafa16419
commit c819c18962
22 changed files with 2116 additions and 332 deletions

View File

@@ -37,8 +37,11 @@ async function getImageBuffer(url: string) {
})
.png()
.toBuffer();
} catch (e) {
logger.error(e, `Failed to get image from url ${url}`);
} catch (error) {
logger.error(`Failed to get image from url`, {
error,
url,
});
}
}
@@ -138,8 +141,10 @@ export async function ping(
count: request.body.count,
domain: request.body.domain,
});
} catch (e) {
logger.error(e, 'Failed to insert ping');
} catch (error) {
request.log.error('Failed to insert ping', {
error,
});
reply.status(500).send({
error: 'Failed to insert ping',
});