refactor: add basic counter metrics for IMC (#5006)

This commit is contained in:
Chethan Rao
2024-06-18 18:29:12 +05:30
committed by GitHub
parent 010e6fe3ee
commit d2092dcb0a
43 changed files with 301 additions and 316 deletions

View File

@ -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)
}