diff --git a/opentelemetry-sdk/src/metrics/manual_reader.rs b/opentelemetry-sdk/src/metrics/manual_reader.rs index 639469a5a1..652bf19a35 100644 --- a/opentelemetry-sdk/src/metrics/manual_reader.rs +++ b/opentelemetry-sdk/src/metrics/manual_reader.rs @@ -27,7 +27,7 @@ use super::{ /// # drop(reader) /// ``` pub struct ManualReader { - inner: Box>, + inner: Mutex, temporality: Temporality, } @@ -58,10 +58,10 @@ impl ManualReader { /// A [MetricReader] which is directly called to collect metrics. pub(crate) fn new(temporality: Temporality) -> Self { ManualReader { - inner: Box::new(Mutex::new(ManualReaderInner { + inner: Mutex::new(ManualReaderInner { sdk_producer: None, is_shutdown: false, - })), + }), temporality, } } diff --git a/opentelemetry-sdk/src/metrics/pipeline.rs b/opentelemetry-sdk/src/metrics/pipeline.rs index add9ba16dc..8fb94c289f 100644 --- a/opentelemetry-sdk/src/metrics/pipeline.rs +++ b/opentelemetry-sdk/src/metrics/pipeline.rs @@ -37,7 +37,7 @@ pub struct Pipeline { pub(crate) resource: Resource, reader: Box, views: Vec>, - inner: Box>, + inner: Mutex, } impl fmt::Debug for Pipeline {