mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
refactor: set merchant_id as MERCHANT_ID_NOT_FOUND for traces and metrics if not found (#2156)
This commit is contained in:
@ -726,7 +726,10 @@ where
|
|||||||
.authenticate_and_fetch(request.headers(), state)
|
.authenticate_and_fetch(request.headers(), state)
|
||||||
.await
|
.await
|
||||||
.switch()?;
|
.switch()?;
|
||||||
let merchant_id = auth_out.get_merchant_id().unwrap_or("").to_string();
|
let merchant_id = auth_out
|
||||||
|
.get_merchant_id()
|
||||||
|
.unwrap_or("MERCHANT_ID_NOT_FOUND")
|
||||||
|
.to_string();
|
||||||
tracing::Span::current().record("merchant_id", &merchant_id);
|
tracing::Span::current().record("merchant_id", &merchant_id);
|
||||||
|
|
||||||
let output = func(state, auth_out, payload).await.switch();
|
let output = func(state, auth_out, payload).await.switch();
|
||||||
|
|||||||
Reference in New Issue
Block a user