Skip to content

Commit

Permalink
remove import reordering
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Coenen <[email protected]>
  • Loading branch information
bnjjj committed Jun 18, 2024
1 parent e7823e6 commit f6f6297
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 32 deletions.
26 changes: 13 additions & 13 deletions opentelemetry-sdk/src/metrics/internal/aggregate.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
use std::marker;
use std::sync::atomic::AtomicU64;
use std::sync::Arc;
use std::{marker, sync::Arc, sync::atomic::AtomicU64};

use once_cell::sync::Lazy;
use opentelemetry::KeyValue;

use super::exponential_histogram::ExpoHistogram;
use super::histogram::Histogram;
use super::last_value::LastValue;
use super::sum::PrecomputedSum;
use super::sum::Sum;
use super::Number;
use crate::metrics::data::Aggregation;
use crate::metrics::data::Gauge;
use crate::metrics::data::Temporality;
use crate::metrics::AttributeSet;
use crate::{
metrics::data::{Aggregation, Gauge, Temporality},
metrics::AttributeSet,
};

use super::{
exponential_histogram::ExpoHistogram,
histogram::Histogram,
last_value::LastValue,
sum::{PrecomputedSum, Sum},
Number,
};

static STREAM_CARDINALITY_LIMIT: AtomicU64 = AtomicU64::new(2000);
pub(crate) static STREAM_OVERFLOW_ATTRIBUTE_SET: Lazy<AttributeSet> = Lazy::new(|| {
Expand Down
16 changes: 5 additions & 11 deletions opentelemetry-sdk/src/metrics/internal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,14 @@ mod last_value;
mod sum;

use core::fmt;
use std::ops::Add;
use std::ops::AddAssign;
use std::ops::Sub;
use std::sync::atomic::AtomicI64;
use std::sync::atomic::AtomicU64;
use std::sync::atomic::Ordering;
use std::ops::{Add, AddAssign, Sub};
use std::sync::atomic::{AtomicI64, AtomicU64, Ordering};
use std::sync::Mutex;

pub use aggregate::set_stream_cardinality_limit;
pub(crate) use aggregate::AggregateBuilder;
pub(crate) use aggregate::ComputeAggregation;
pub(crate) use aggregate::Measure;
pub(crate) use exponential_histogram::EXPO_MAX_SCALE;
pub(crate) use exponential_histogram::EXPO_MIN_SCALE;

pub(crate) use aggregate::{AggregateBuilder, ComputeAggregation, Measure};
pub(crate) use exponential_histogram::{EXPO_MAX_SCALE, EXPO_MIN_SCALE};

/// Marks a type that can have a value added and retrieved atomically. Required since
/// different types have different backing atomic mechanisms
Expand Down
14 changes: 6 additions & 8 deletions opentelemetry-sdk/src/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,22 @@ pub(crate) mod pipeline;
pub mod reader;
pub(crate) mod view;

use std::collections::hash_map::DefaultHasher;
use std::collections::HashSet;
use std::hash::Hash;
use std::hash::Hasher;

pub use aggregation::*;
pub use instrument::*;
pub use internal::set_stream_cardinality_limit;
pub use manual_reader::*;
pub use meter::*;
pub use meter_provider::*;
use opentelemetry::Key;
use opentelemetry::KeyValue;
use opentelemetry::Value;
pub use periodic_reader::*;
pub use pipeline::Pipeline;
pub use view::*;

use std::collections::hash_map::DefaultHasher;
use std::collections::HashSet;
use std::hash::{Hash, Hasher};

use opentelemetry::{Key, KeyValue, Value};

/// A unique set of attributes that can be used as instrument identifiers.
///
/// This must implement [Hash], [PartialEq], and [Eq] so it may be used as
Expand Down

0 comments on commit f6f6297

Please sign in to comment.