File tree 3 files changed +24
-32
lines changed
opentelemetry-sdk/src/metrics
3 files changed +24
-32
lines changed Original file line number Diff line number Diff line change 1
- use std:: marker;
2
- use std:: sync:: atomic:: AtomicU64 ;
3
- use std:: sync:: Arc ;
1
+ use std:: { marker, sync:: Arc , sync:: atomic:: AtomicU64 } ;
4
2
5
3
use once_cell:: sync:: Lazy ;
6
4
use opentelemetry:: KeyValue ;
7
5
8
- use super :: exponential_histogram:: ExpoHistogram ;
9
- use super :: histogram:: Histogram ;
10
- use super :: last_value:: LastValue ;
11
- use super :: sum:: PrecomputedSum ;
12
- use super :: sum:: Sum ;
13
- use super :: Number ;
14
- use crate :: metrics:: data:: Aggregation ;
15
- use crate :: metrics:: data:: Gauge ;
16
- use crate :: metrics:: data:: Temporality ;
17
- use crate :: metrics:: AttributeSet ;
6
+ use crate :: {
7
+ metrics:: data:: { Aggregation , Gauge , Temporality } ,
8
+ metrics:: AttributeSet ,
9
+ } ;
10
+
11
+ use super :: {
12
+ exponential_histogram:: ExpoHistogram ,
13
+ histogram:: Histogram ,
14
+ last_value:: LastValue ,
15
+ sum:: { PrecomputedSum , Sum } ,
16
+ Number ,
17
+ } ;
18
18
19
19
static STREAM_CARDINALITY_LIMIT : AtomicU64 = AtomicU64 :: new ( 2000 ) ;
20
20
pub ( crate ) static STREAM_OVERFLOW_ATTRIBUTE_SET : Lazy < AttributeSet > = Lazy :: new ( || {
Original file line number Diff line number Diff line change @@ -5,20 +5,14 @@ mod last_value;
5
5
mod sum;
6
6
7
7
use core:: fmt;
8
- use std:: ops:: Add ;
9
- use std:: ops:: AddAssign ;
10
- use std:: ops:: Sub ;
11
- use std:: sync:: atomic:: AtomicI64 ;
12
- use std:: sync:: atomic:: AtomicU64 ;
13
- use std:: sync:: atomic:: Ordering ;
8
+ use std:: ops:: { Add , AddAssign , Sub } ;
9
+ use std:: sync:: atomic:: { AtomicI64 , AtomicU64 , Ordering } ;
14
10
use std:: sync:: Mutex ;
15
11
16
12
pub use aggregate:: set_stream_cardinality_limit;
17
- pub ( crate ) use aggregate:: AggregateBuilder ;
18
- pub ( crate ) use aggregate:: ComputeAggregation ;
19
- pub ( crate ) use aggregate:: Measure ;
20
- pub ( crate ) use exponential_histogram:: EXPO_MAX_SCALE ;
21
- pub ( crate ) use exponential_histogram:: EXPO_MIN_SCALE ;
13
+
14
+ pub ( crate ) use aggregate:: { AggregateBuilder , ComputeAggregation , Measure } ;
15
+ pub ( crate ) use exponential_histogram:: { EXPO_MAX_SCALE , EXPO_MIN_SCALE } ;
22
16
23
17
/// Marks a type that can have a value added and retrieved atomically. Required since
24
18
/// different types have different backing atomic mechanisms
Original file line number Diff line number Diff line change @@ -52,24 +52,22 @@ pub(crate) mod pipeline;
52
52
pub mod reader;
53
53
pub ( crate ) mod view;
54
54
55
- use std:: collections:: hash_map:: DefaultHasher ;
56
- use std:: collections:: HashSet ;
57
- use std:: hash:: Hash ;
58
- use std:: hash:: Hasher ;
59
-
60
55
pub use aggregation:: * ;
61
56
pub use instrument:: * ;
62
57
pub use internal:: set_stream_cardinality_limit;
63
58
pub use manual_reader:: * ;
64
59
pub use meter:: * ;
65
60
pub use meter_provider:: * ;
66
- use opentelemetry:: Key ;
67
- use opentelemetry:: KeyValue ;
68
- use opentelemetry:: Value ;
69
61
pub use periodic_reader:: * ;
70
62
pub use pipeline:: Pipeline ;
71
63
pub use view:: * ;
72
64
65
+ use std:: collections:: hash_map:: DefaultHasher ;
66
+ use std:: collections:: HashSet ;
67
+ use std:: hash:: { Hash , Hasher } ;
68
+
69
+ use opentelemetry:: { Key , KeyValue , Value } ;
70
+
73
71
/// A unique set of attributes that can be used as instrument identifiers.
74
72
///
75
73
/// This must implement [Hash], [PartialEq], and [Eq] so it may be used as
You can’t perform that action at this time.
0 commit comments