mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
refactor: add basic counter metrics for IMC (#5006)
This commit is contained in:
@ -1,16 +1,8 @@
|
||||
//! Metrics interface
|
||||
|
||||
use router_env::{counter_metric, global_meter, metrics_context, opentelemetry};
|
||||
use router_env::{counter_metric, global_meter, metrics_context};
|
||||
|
||||
metrics_context!(CONTEXT);
|
||||
global_meter!(GLOBAL_METER, "ROUTER_API");
|
||||
|
||||
counter_metric!(UNIMPLEMENTED_FLOW, GLOBAL_METER);
|
||||
|
||||
/// fn add attributes
|
||||
pub fn add_attributes<T: Into<opentelemetry::Value>>(
|
||||
key: &'static str,
|
||||
value: T,
|
||||
) -> opentelemetry::KeyValue {
|
||||
opentelemetry::KeyValue::new(key, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user