mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 17:47:54 +08:00
refactor: Move trait ConnectorIntegration to crate hyperswitch_interfaces (#4946)
Co-authored-by: Deepanshu Bansal <deepanshu.bansal@Deepanshu-Bansal-K3PYF02LFW.local>
This commit is contained in:
16
crates/hyperswitch_interfaces/src/metrics.rs
Normal file
16
crates/hyperswitch_interfaces/src/metrics.rs
Normal file
@ -0,0 +1,16 @@
|
||||
//! Metrics interface
|
||||
|
||||
use router_env::{counter_metric, global_meter, metrics_context, opentelemetry};
|
||||
|
||||
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