Skip to content

Commit 00b3122

Browse files
committed
fix temporality
1 parent 80a9d65 commit 00b3122

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

opentelemetry-sdk/src/metrics/periodic_reader_with_own_thread.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ use crate::{
1717
};
1818

1919
use super::{
20-
data::{ResourceMetrics, Temporality},
21-
instrument::InstrumentKind,
22-
reader::MetricReader,
23-
Pipeline,
20+
data::ResourceMetrics, instrument::InstrumentKind, reader::MetricReader, Pipeline, Temporality,
2421
};
2522

2623
const DEFAULT_TIMEOUT: Duration = Duration::from_secs(30);
@@ -478,7 +475,7 @@ impl MetricReader for PeriodicReaderWithOwnThread {
478475
/// If not configured, the Cumulative temporality SHOULD be used.
479476
///
480477
/// [metric-reader]: https://github.com/open-telemetry/opentelemetry-specification/blob/0a78571045ca1dca48621c9648ec3c832c3c541c/specification/metrics/sdk.md#metricreader
481-
fn temporality(&self, kind: InstrumentKind) -> super::data::Temporality {
478+
fn temporality(&self, kind: InstrumentKind) -> Temporality {
482479
kind.temporality_preference(self.inner.temporality(kind))
483480
}
484481
}
@@ -488,10 +485,8 @@ mod tests {
488485
use super::PeriodicReaderWithOwnThread;
489486
use crate::{
490487
metrics::{
491-
data::{ResourceMetrics, Temporality},
492-
exporter::PushMetricExporter,
493-
reader::MetricReader,
494-
MetricError, MetricResult, SdkMeterProvider,
488+
data::ResourceMetrics, exporter::PushMetricExporter, reader::MetricReader, MetricError,
489+
MetricResult, SdkMeterProvider, Temporality,
495490
},
496491
testing::metrics::InMemoryMetricExporter,
497492
Resource,

0 commit comments

Comments
 (0)