From c0863b93c3dc463de4abffc2b5ab2412f294967a Mon Sep 17 00:00:00 2001 From: Matthieu Pignolet Date: Sun, 7 Jul 2024 01:16:33 +0400 Subject: [PATCH] fix warnings --- exes/rest/src/handler.rs | 2 +- libs/leash/src/lib.rs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/exes/rest/src/handler.rs b/exes/rest/src/handler.rs index cd867fe..a74c7c8 100644 --- a/exes/rest/src/handler.rs +++ b/exes/rest/src/handler.rs @@ -27,7 +27,7 @@ use lazy_static::lazy_static; lazy_static! { static ref METER_NAME: &'static str = ""; static ref REQUESTS: Counter = { - global::meter(&METER_NAME) + global::meter(**&METER_NAME) .u64_counter("rest.http_requests_total") .with_description("Amount of requests processed by the rest reverse proxy") .init() diff --git a/libs/leash/src/lib.rs b/libs/leash/src/lib.rs index 198d1ef..c82e2f3 100644 --- a/libs/leash/src/lib.rs +++ b/libs/leash/src/lib.rs @@ -18,7 +18,6 @@ use serde::de::DeserializeOwned; use shared::config::Settings; use std::str::FromStr; use std::{future::Future, pin::Pin}; -use tokio::runtime::Handle; use tokio::sync::oneshot; use tracing::{error, info, trace}; use tracing_subscriber::filter::Directive; @@ -52,7 +51,11 @@ where .as_ref() .and_then(|f| f.metrics.clone()) { - let otlp_exporter = opentelemetry_otlp::new_exporter().tonic(); + let otlp_exporter = opentelemetry_otlp::new_exporter() + .tonic() + .with_endpoint(&meter_config.endpoint) + .with_protocol(meter_config.protocol) + .with_timeout(meter_config.timeout); // Then pass it into pipeline builder let _ = opentelemetry_otlp::new_pipeline() .tracing()