rocket-connect / graphql-debugger

Debug your GraphQL server.

Home Page:https://graphql-debugger.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Total Trace Duration - sum of span times

danstarns opened this issue · comments

Problem

The Trace time should be the total sum of all the durations for each span in the trace.

Given the screenshot debugger shows that listTraceGroups takes 1 ms, however, it should be 63 ms being the sum of all the span durations.

Screenshot 2023-09-18 at 15 47 42

@danstarns Could you clarify the issue? I assume you're talking about the first Span in the Trace Viewer not expanding all the way across right?
image

I believe this is actually the correct behaviour; the listSchemas query in this case is recording the time spent in the root level query (in this example, packages/graphql-schema/src/queries/list-schemas.ts) and the further traces refer to the very simple, yet still present, field resolvers for the schemas field. As these are merely JS lookups, it's no surprise they take microseconds to resolve, however the 11ms in listSchemas will be the Prisma query, which is bound to take a long time and that's before the schema has even begun to resolve the schemas field.

Please let me know if I have the wrong end of the stick here, but I'm tempted to say "its a feature" 😄

@Tohaker I updated the description of this issue, please let me know if you need more clarification.

Thanks Dan, I definitely misunderstood 😅 that issue can definitely be fixed

Fixed, tested and released in alpha-62.