You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an elysia project, copy the following code (adjusted from Trace docs):
import{Elysia}from"elysia";constapp=newElysia({aot: false}).trace(async({ onHandle })=>{onHandle(({ begin, onStop })=>{onStop(({ end })=>{console.log('handle took',end-begin,'ms')})})}).get('/',()=>'Hi').listen(3000)console.log(`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`);
Run the project, and call http://localhost:3000. The API itself should return HTTP 200.
What is the expected behavior?
It should display handle took xxms.
What do you see instead?
If using aot=false, the process doesn't log anything in the .trace() method (no console.log values displayed). But, on the other hand, usingaot=true, it works as intended.
What version of Elysia is running?
^1.2.10
What platform is your computer?
Darwin 24.3.0 arm64 arm
What steps can reproduce the bug?
http://localhost:3000
. The API itself should returnHTTP 200
.What is the expected behavior?
It should display
handle took xxms
.What do you see instead?
If using
aot=false
, the process doesn't log anything in the.trace()
method (noconsole.log
values displayed). But, on the other hand, usingaot=true
, it works as intended.Additional information
I highly suspects that this problem also impact (at least) the
@elysiajs/opentelemetry
, since it also utilizes the.trace()
handler (see also: elysiajs/opentelemetry#11).Have you try removing the
node_modules
andbun.lockb
and try again yet?Yes
The text was updated successfully, but these errors were encountered: