Add Blink Prometheus listener (#11509)

This commit is contained in:
Austin McKinley
2026-08-20 08:50:12 -07:00
committed by GitHub
parent 3f7cf5b592
commit 56e16fcdf1
9 changed files with 168 additions and 8 deletions
+8 -5
View File
@@ -10,6 +10,7 @@ async function main() {
httpLogger.info(
{
port: cfg.service.port,
metricsPort: cfg.service.metricsPort,
safelinkEnabled: cfg.service.safelinkEnabled,
hasDbUrl: !!cfg.db.url,
hasDbMigrationUrl: !!cfg.db.migrationUrl,
@@ -33,16 +34,18 @@ async function main() {
if (link.ctx.cfg.service.safelinkEnabled) {
httpLogger.info('Starting Safelink client')
link.ctx.safelinkClient.runFetchEvents()
void link.ctx.safelinkClient.runFetchEvents()
}
await link.start()
httpLogger.info('Link service is running')
process.on('SIGTERM', async () => {
httpLogger.info('Link service is stopping')
await link.destroy()
httpLogger.info('Link service is stopped')
process.on('SIGTERM', () => {
void (async () => {
httpLogger.info('Link service is stopping')
await link.destroy()
httpLogger.info('Link service is stopped')
})()
})
} catch (error) {
httpLogger.error(