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
The route handler as a child span of the GET /example from @opentelemetry/instrumentation-http (and thus, jaeger correctly identifying the critical path of the request)
What did you see instead?
The route handler has a child span of the first middleware span middleware - fastify -> @fastify/request-context from @opentelemetry/instrumentation-fastify (and thus jaeger incorrectly identifying the critical path of my trace)
Additional context
Screenshot of what I'm seeing and full JSON of the trace downloaded from jaeger attached
drewcorlin1
changed the title
Fastify instrumentation incorrectly sets middleware are parent span to handler
Fastify instrumentation incorrectly sets middleware span as parent span to route handler
Dec 31, 2024
then I get the correct behavior as far as parent spans go, but the duration of the span is incorrect
drewcorlin1
changed the title
Fastify instrumentation incorrectly sets middleware span as parent span to route handler
Fastify instrumentation incorrectly sets middleware span as parent span to route handler with sync hooks
Dec 31, 2024
What version of OpenTelemetry are you using?
What version of Node are you using?
20.18
What did you do?
Repo to reproduce with steps in the README: https://github.com/drewcorlin1/fastify-otel-bug-example
What did you expect to see?
The route handler as a child span of the
GET /example
from@opentelemetry/instrumentation-http
(and thus, jaeger correctly identifying the critical path of the request)What did you see instead?
The route handler has a child span of the first middleware span
middleware - fastify -> @fastify/request-context
from@opentelemetry/instrumentation-fastify
(and thus jaeger incorrectly identifying the critical path of my trace)Additional context
Screenshot of what I'm seeing and full JSON of the trace downloaded from jaeger attached
fastify-trace.json
The text was updated successfully, but these errors were encountered: