Nestjs-OpenTelemetry
Nestjs-OpenTelemetry copied to clipboard
Bug: Parent span duration is not correctly calculated
As you can see on the screenshot below, the parent span duration is not calculated correctly.
Parent span (provider->identityservice.get
) should also include the duration of child spans in its own duration. The same goes for controller->identitycontroller.profile
.
I am using nestjs version 9 and zipkin in order to visualize traces.
I think the issue is in this line: https://github.com/MetinSeylan/Nestjs-OpenTelemetry/blob/main/src/Trace/Injectors/BaseTraceInjector.ts#L68C13-L68C13 because this issue occurs with async functions. There should be other check to determine if the function is async.
You can use my version https://github.com/Yuuki-Sakura/nestjs-open-telemetry I fixed a lot of bugs.