-
-
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.18
What platform is your computer?
Darwin 25.1.0 arm64 arm
What steps can reproduce the bug?
After upgrading to latest elysia and opentelemetry plugin, all the traces seem to be reported as 200 although that is not the case. The repo should be as simple as the code below and checking the trace out in Jaeger or Datadog
import { Elysia } from 'elysia'
import { opentelemetry } from '@elysiajs/opentelemetry'
import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-node'
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'
import {ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION} from '@opentelemetry/semantic-conventions';
import {resourceFromAttributes} from '@opentelemetry/resources';
const serviceName = 'elysia-test';
const version = '0.0.0';
const environment = 'dev';
new Elysia()
.use(
opentelemetry({
serviceName: 'elysia-test',
spanProcessors: [
new BatchSpanProcessor(
new OTLPTraceExporter({
url: 'http://localhost:4317',
headers: {'Content-Type': 'application/json'},
})
)
],
resource: resourceFromAttributes({
[ATTR_SERVICE_NAME]: serviceName,
[ATTR_SERVICE_VERSION]: version,
['deployment.environment']: environment,
}),
})
.get('/test', ({set}) => {
set.status = 500;
return 'Hello, world!';
})
)
.listen(3000)
What is the expected behavior?
Correct status code is reported
What do you see instead?
All the traces are tagged as 200 although browser response is confirmed to have non-200 status code
Additional information
No response
Have you try removing the node_modules and bun.lockb and try again yet?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working