Monitor in Node (PerformanceObserver is not yet implemented in Bun.
in bun 1.0.3)
import { collectDefaultMetrics, register } from 'prom-client'
if (req.method === 'GET' && pathname === '/metrics/') {
return new Response(await register.metrics(), {
headers: {
'Content-Type': register.contentType,
},
})
}
In fly.toml
[metrics]
port = 4000
path = "/metrics"
Then inspect at https://fly-metrics.net/