diff --git a/backend/src/email/services/email-callback.service.ts b/backend/src/email/services/email-callback.service.ts index 231c47bbb..ce407ec8c 100644 --- a/backend/src/email/services/email-callback.service.ts +++ b/backend/src/email/services/email-callback.service.ts @@ -25,7 +25,8 @@ const isAuthenticated = (authHeader?: string): boolean => { } const parseEvent = async (req: Request): Promise => { - const parseJsonSpan = tracer.startSpan('parseJson') + const parentSpan = tracer.scope().active() || undefined + const parseJsonSpan = tracer.startSpan('parseJson', { childOf: parentSpan }) const parsed = JSON.parse(req.body) parseJsonSpan.finish() let records: Promise[] = []