We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59ba671 commit 204c234Copy full SHA for 204c234
packages/server/utils/useDatadogTracing.ts
@@ -57,6 +57,9 @@ export const useDatadogTracing = (config: Config): Plugin<DDContext & ServerCont
57
const path = getPath(info, config)
58
const computedPathString = path.join('.')
59
const ddContext = context[ddSymbol]
60
+ // context is set in onExecute or onSubscribe, depending on the parent operation
61
+ // if the parent operation did not set context, then the resolver has no parent & we cannot continue
62
+ if (!ddContext) return
63
const {rootSpan, fields} = ddContext
64
// if collapsed, we just measure the first item in a list
65
if (config.collapse && fields[computedPathString]) return
0 commit comments