Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/server/utils/useDatadogTracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export const useDatadogTracing = (config: Config): Plugin<DDContext & ServerCont
const path = getPath(info, config)
const computedPathString = path.join('.')
const ddContext = context[ddSymbol]
// context is set in onExecute or onSubscribe, depending on the parent operation
// if the parent operation did not set context, then the resolver has no parent & we cannot continue
if (!ddContext) return
const {rootSpan, fields} = ddContext
// if collapsed, we just measure the first item in a list
if (config.collapse && fields[computedPathString]) return
Expand Down