From 7b973569246e02659dd57b05e872648080a03eec Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Thu, 23 May 2024 18:10:37 +0000 Subject: [PATCH] fix: tags --- src/lib/util.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/util.js b/src/lib/util.js index 468dd544..b17d2538 100644 --- a/src/lib/util.js +++ b/src/lib/util.js @@ -47,12 +47,12 @@ const failActionHandler = async (request, h, err) => { throw err } -const getSpanTags = ({ payload, headers, params }, transactionType, transactionAction) => { +const getSpanTags = ({ payload, headers, params, spanContext }, transactionType, transactionAction) => { const tags = { transactionType, transactionAction, - transactionId: (payload && payload.transactionId) || (params && params.id), - quoteId: (payload && payload.quoteId) || (params && params.id), + transactionId: (payload && payload.transactionId) || (params && params.id) || (spanContext && spanContext.transactionId), + quoteId: (payload && payload.quoteId) || (params && params.id) || (spanContext && spanContext.quoteId), source: headers[Enum.Http.Headers.FSPIOP.SOURCE], destination: headers[Enum.Http.Headers.FSPIOP.DESTINATION] }