Closed paymog closed 9 months ago
This is currently the only blocker for us to start using Bun 💯💯💯
I would like to support @kristofgazso . For our company it's also the single blocker.
This is our only blocker as well.
Only blocker as well. Getting the error when trying to run our Fastify server, due to the fact that we are using fastify-metrics, that also uses prom-client.
Yep, us too, we would have to rewrite a bunch of container apps or remove prom-client
Hey @Jarred-Sumner. I'd like to maybe give Zig a shot and try implementing this feature in Bun. Keep in mind, I never wrote Zig, nor I ever contributed to this repository, but it would be great to have an excuse.
Beside setting up the Bun development environment, could you give me a guideline or two where to start looking.
Thanks
For us it would also be really important :D We would like to see Bun Performance in our reports 😎
This is a blocker for my project too. I would love to contribute.
This is a currently the only blocker for https://github.com/0xOlias/ponder too.
Ponder uses prom-client
which requires this API
Bun is a prime candidate for replacing Node for microservices I am working on. By commenting out collectDefaultMetrics
, these services work perfectly. This issue is a blocker on any plans for migrating to Bun since Prometheus is not a tool I can remove.
Also a blocker for us. Can't remove Prometheus.
Last blocker for Planfred to run on bun
Love to see it soon.
The good news is we can almost entirely re-use the implementation from Safari for this API.
I think this would mostly look like:
PerformanceObserver.cpp
PerformanceObserver.h
PerformanceObserver.idl
PerformanceObserverCallback.h
PerformanceObserverCallback.idl
PerformanceObserverEntryList.cpp
PerformanceObserverEntryList.h
PerformanceObserverEntryList.idl
PerformanceMark.cpp
PerformanceMark.h
PerformanceMark.idl
PerformanceMarkOptions.h
PerformanceMarkOptions.idl
PerformanceMeasure.cpp
PerformanceMeasure.h
PerformanceMeasure.idl
PerformanceMeasureOptions.h
PerformanceMeasureOptions.idl
mark
, measure
, etc to the performance objectPerformanceObserver
globallyI don't love this approach because it would be nice to emit various events from zig. I also don't love how many memory allocations are involved in WebKit's implementation. performance.mark
and performance.measure
needs to be pretty cheap. But this approach is straightforward to ship (and would be faster than an equivalent JS approach)
Any movement on this?
yes, will this happen?
On Thu, 21 Dec 2023, 9:10 pm Aleksandar Grbic, @.***> wrote:
Any movement on this?
— Reply to this email directly, view it on GitHub https://github.com/oven-sh/bun/issues/4708#issuecomment-1866217439, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJ7RUEFNOEKLZORFH2ZN6DYKQYNLAVCNFSM6AAAAAA4RRQSYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWGIYTONBTHE . You are receiving this because you commented.Message ID: @.***>
Hi, any news on that? Thanks a lot!!!
This will ship in Bun v1.0.22, thanks to @gvilums
can this issue be reopened @Jarred-Sumner , I tried to run bun , but its kicking off this error both in windows and docker environments
16 |
17 | class NotImplementedError extends Error {
18 | code;
19 | constructor(feature, issue) {
^
NotImplementedError: perf_hooks.monitorEventLoopDelay is not yet implemented in Bun.
code: "ERR_NOT_IMPLEMENTED"
at new NotImplementedError (internal:shared:19:27)
at internal:shared:2:69
at monitorEventLoopDelay (node:perf_hooks:123:47)
at /usr/src/app/node_modules/prom-client/lib/metrics/eventLoopLag.js:47:21
at collectDefaultMetrics (/usr/src/app/node_modules/prom-client/lib/defaultMetrics.js:47:3)
at /usr/src/app/prom.js:34:1
at /usr/src/app/metrics.controller.js:17:7
at /usr/src/app/app.module.js:17:7`
here is the link to the source code which I wanted to run Existing nest/express API with Node
https://github.com/bcgov/nr-omrr-transparency/tree/main/backend
can this issue be reopened @Jarred-Sumner , I tried to run bun , but its kicking off this error both in windows and docker environments Looks like it's here: https://github.com/oven-sh/bun/issues/9432
What is the problem this feature would solve?
It would be great if Bun could implement the PerformanceObserver which seems to be required for using the prom-client package.
EDIT: turns out this is only required when
collectDefaultMetrics
is called on the client.What is the feature you are proposing to solve the problem?
Implementation of the PerformanceObserver which is currently not implemented
What alternatives have you considered?
None yet, I'm very new to the ecosystem.