Skip to content

Bug: Parent span duration is not correctly calculated #68

@ikovac

Description

@ikovac

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.

Screenshot 2023-06-30 at 13 41 09

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions