From 40c12d57e9915b381d8ec6653ea2d7b27775b808 Mon Sep 17 00:00:00 2001 From: KishenKumarrrrr Date: Mon, 25 Nov 2024 09:27:32 +0800 Subject: [PATCH] chore: manually add reference parent span --- backend/src/email/services/email-callback.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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[] = []