]> git.puffer.fish Git - matthieu/nova.git/commitdiff
fix warnings
authorMatthieu Pignolet <matthieu@matthieu-dev.xyz>
Sat, 6 Jul 2024 21:16:33 +0000 (01:16 +0400)
committerMatthieu Pignolet <matthieu@matthieu-dev.xyz>
Sat, 6 Jul 2024 21:16:33 +0000 (01:16 +0400)
exes/rest/src/handler.rs
libs/leash/src/lib.rs

index cd867fe705e54aeb8f8f11de379d5ef359ead2ba..a74c7c8119a4b27ab1bdb58f46a5c663785cbc6f 100644 (file)
@@ -27,7 +27,7 @@ use lazy_static::lazy_static;
 lazy_static! {
     static ref METER_NAME: &'static str = "";
     static ref REQUESTS: Counter<u64> = {
-        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()
index 198d1ef52f2b2979fa53662e19f318438c446807..c82e2f32f50c3d8c4b63547ceb07d468601ab3dc 100644 (file)
@@ -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()