Is it possible to use in Bun/Deno/other runtime?
Hi, currently i use prom-client in nodejs app and want to use it in other runtime such as Deno or Bun
Is it possible today?
I dunno. We use a bunch of node specific APIs, but mostly in the default metrics. I guess you could omit them?
I've never used either Deno or Bun, so you'd have to tell us and potentially send PRs for changes needed 🙂
Yes, node and v8 specific default metrics can be omitted
@krutoo if you want to test my PR, that would be helpful: bun install siimon/prom-client#zb/bun.
@zbjornson @SimenB i see that Bun now partially implements perf_hooks: https://bun.sh/docs/runtime/nodejs-apis#node-perf-hooks
But missing createHistogram and monitorEventLoopDelay.
When i try to use PromClient.collectDefaultMetrics In my Bun app i get error:
NotImplementedError: perf_hooks.monitorEventLoopDelay is not yet implemented in Bun.
code: "ERR_NOT_IMPLEMENTED"
Yes, node and v8 specific default metrics can be omitted
@krutoo How? Is it documented anywhere? I want to omit metric by metric
Yes, node and v8 specific default metrics can be omitted
@krutoo How? Is it documented anywhere? I want to omit metric by metric
@dawidsowardx I mean in my case I skip call PromClient.collectDefaultMetrics() and collect only custom metrics
https://github.com/siimon/prom-client/releases/tag/v15.1.2