mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
refactor(router): added logs health and deep health (#3780)
This commit is contained in:
@ -11,7 +11,7 @@ use crate::{
|
||||
};
|
||||
/// .
|
||||
// #[logger::instrument(skip_all, name = "name1", level = "warn", fields( key1 = "val1" ))]
|
||||
#[instrument(skip_all)]
|
||||
#[instrument(skip_all, fields(flow = ?Flow::HealthCheck))]
|
||||
// #[actix_web::get("/health")]
|
||||
pub async fn health() -> impl actix_web::Responder {
|
||||
metrics::HEALTH_METRIC.add(&metrics::CONTEXT, 1, &[]);
|
||||
|
||||
@ -87,7 +87,7 @@ impl From<Flow> for ApiIdentifier {
|
||||
|
||||
Flow::EphemeralKeyCreate | Flow::EphemeralKeyDelete => Self::Ephemeral,
|
||||
|
||||
Flow::DeepHealthCheck => Self::Health,
|
||||
Flow::DeepHealthCheck | Flow::HealthCheck => Self::Health,
|
||||
Flow::MandatesRetrieve | Flow::MandatesRevoke | Flow::MandatesList => Self::Mandates,
|
||||
|
||||
Flow::PaymentMethodsCreate
|
||||
|
||||
@ -57,6 +57,8 @@ pub enum Tag {
|
||||
/// API Flow
|
||||
#[derive(Debug, Display, Clone, PartialEq, Eq)]
|
||||
pub enum Flow {
|
||||
/// Health check
|
||||
HealthCheck,
|
||||
/// Deep health Check
|
||||
DeepHealthCheck,
|
||||
/// Merchants account create flow.
|
||||
|
||||
Reference in New Issue
Block a user