add prom metrics to blink

This commit is contained in:
Hailey
2025-09-07 12:56:04 -07:00
parent 5cd4a3362d
commit 535c19ad86
11 changed files with 202 additions and 4 deletions
+3
View File
@@ -1,6 +1,7 @@
import {SafelinkClient} from './cache/safelinkClient.js'
import {type Config} from './config.js'
import Database from './db/index.js'
import {Metrics} from './metrics.js'
export type AppContextOptions = {
cfg: Config
@@ -10,6 +11,7 @@ export type AppContextOptions = {
export class AppContext {
cfg: Config
db: Database
metrics: Metrics = new Metrics()
safelinkClient: SafelinkClient
abortController = new AbortController()
@@ -19,6 +21,7 @@ export class AppContext {
this.safelinkClient = new SafelinkClient({
cfg: this.opts.cfg.service,
db: this.opts.db,
metrics: this.metrics,
})
}