build(deps): bump opentelemetry crates to 0.27 (#6774)

This commit is contained in:
Sanchith Hegde
2024-12-10 16:35:34 +05:30
committed by GitHub
parent a52828296a
commit 47a3d2b2ab
86 changed files with 739 additions and 1086 deletions

View File

@ -12,7 +12,6 @@ use common_utils::errors::ReportSwitchExt;
use error_stack::ResultExt;
use router_env::{
instrument, logger,
metrics::add_attributes,
tracing::{self, Instrument},
};
@ -136,14 +135,14 @@ pub async fn get_api_event_metrics(
.change_context(AnalyticsError::UnknownError)?
{
let data = data?;
let attributes = &add_attributes([
let attributes = router_env::metric_attributes!(
("metric_type", metric.to_string()),
("source", pool.to_string()),
]);
);
let value = u64::try_from(data.len());
if let Ok(val) = value {
metrics::BUCKETS_FETCHED.record(&metrics::CONTEXT, val, attributes);
metrics::BUCKETS_FETCHED.record(val, attributes);
logger::debug!("Attributes: {:?}, Buckets fetched: {}", attributes, val);
}
for (id, value) in data {