-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Elysia is running?
1.4.13
What platform is your computer?
Darwin 24.4.0 arm64 arm
What steps can reproduce the bug?
Create Elysia app like below, with any otel instrumentation
const app = new Elysia({ adapter: node() })
.use(instrumentation)
.onError(({ error }) => {
console.log(error);
return {
error: error,
};
})
// works fine
.get("/", () => {
return "Hello Elysia";
})
// No root span
.get("/error", () => {
throw new Error("Error");
})
.listen(3000)And then try requesting /error. You should see a trace with child spans, but not root span.
What is the expected behavior?
The root span is sent and shown in the trace viewer.
What do you see instead?
Grafana Tempo shows: <root span not yet received> at the trace. Though, the child spans are logged properly. They all have parent root span id property, but the root span isn't there.
Additional information
A workaround:
I tried manually update the elysia's opentelemetry function by copying whatever inside onAfterResponse into onError callback and it solved the problem.
Fail
Pass (using my workaround)
Have you try removing the node_modules and bun.lockb and try again yet?
yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working