Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use in Bun/Deno/other runtime? #570

Closed
krutoo opened this issue May 12, 2023 · 7 comments · Fixed by #624 · May be fixed by #599
Closed

Is it possible to use in Bun/Deno/other runtime? #570

krutoo opened this issue May 12, 2023 · 7 comments · Fixed by #624 · May be fixed by #599

Comments

@krutoo
Copy link

krutoo commented May 12, 2023

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?

@krutoo krutoo changed the title is it possible to use in Bun/Deno/other runtime? Is it possible to use in Bun/Deno/other runtime? May 12, 2023
@SimenB
Copy link
Collaborator

SimenB commented May 12, 2023

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 🙂

@krutoo
Copy link
Author

krutoo commented May 13, 2023

Yes, node and v8 specific default metrics can be omitted

zbjornson added a commit that referenced this issue Nov 25, 2023
Adds feature testing to more default metrics so that Bun (and possibly Deno) work.

Ref #570
zbjornson added a commit that referenced this issue Nov 25, 2023
Adds feature testing to more default metrics so that Bun (and possibly Deno) work.

Ref #570
zbjornson added a commit that referenced this issue Nov 25, 2023
Adds feature testing to more default metrics so that Bun (and possibly Deno) work.

Ref #570
zbjornson added a commit that referenced this issue Nov 25, 2023
Adds feature testing to more default metrics so that Bun (and possibly Deno) work.

Ref #570
@zbjornson
Copy link
Collaborator

@krutoo if you want to test my PR, that would be helpful: bun install siimon/prom-client#zb/bun.

@krutoo
Copy link
Author

krutoo commented Feb 28, 2024

@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"

@dawidsowardx
Copy link

dawidsowardx commented Apr 2, 2024

Yes, node and v8 specific default metrics can be omitted

@krutoo How? Is it documented anywhere? I want to omit metric by metric

@krutoo
Copy link
Author

krutoo commented Apr 2, 2024

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

@SimenB
Copy link
Collaborator

SimenB commented Apr 16, 2024

https://github.com/siimon/prom-client/releases/tag/v15.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants