Skip to content

Commit 62297c0

Browse files
committed
Remove unsed code
1 parent 20ebfe3 commit 62297c0

File tree

2 files changed

+2
-40
lines changed

2 files changed

+2
-40
lines changed

opentelemetry-sdk/src/metrics/noop.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use opentelemetry::{
2-
metrics::{AsyncInstrument, InstrumentProvider, SyncInstrument},
2+
metrics::{InstrumentProvider, SyncInstrument},
33
KeyValue,
44
};
55

@@ -36,22 +36,3 @@ impl<T> SyncInstrument<T> for NoopSyncInstrument {
3636
// Ignored
3737
}
3838
}
39-
40-
/// A no-op async instrument.
41-
#[derive(Debug, Default)]
42-
pub(crate) struct NoopAsyncInstrument {
43-
_private: (),
44-
}
45-
46-
impl NoopAsyncInstrument {
47-
/// Create a new no-op async instrument
48-
pub(crate) fn new() -> Self {
49-
NoopAsyncInstrument { _private: () }
50-
}
51-
}
52-
53-
impl<T> AsyncInstrument<T> for NoopAsyncInstrument {
54-
fn observe(&self, _value: T, _attributes: &[KeyValue]) {
55-
// Ignored
56-
}
57-
}

opentelemetry/src/metrics/noop.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! has been set. It is expected to have minimal resource utilization and
55
//! runtime impact.
66
use crate::{
7-
metrics::{AsyncInstrument, InstrumentProvider, Meter, MeterProvider},
7+
metrics::{InstrumentProvider, Meter, MeterProvider},
88
KeyValue,
99
};
1010
use std::sync::Arc;
@@ -69,22 +69,3 @@ impl<T> SyncInstrument<T> for NoopSyncInstrument {
6969
// Ignored
7070
}
7171
}
72-
73-
/// A no-op async instrument.
74-
#[derive(Debug, Default)]
75-
pub(crate) struct NoopAsyncInstrument {
76-
_private: (),
77-
}
78-
79-
impl NoopAsyncInstrument {
80-
/// Create a new no-op async instrument
81-
pub(crate) fn new() -> Self {
82-
NoopAsyncInstrument { _private: () }
83-
}
84-
}
85-
86-
impl<T> AsyncInstrument<T> for NoopAsyncInstrument {
87-
fn observe(&self, _value: T, _attributes: &[KeyValue]) {
88-
// Ignored
89-
}
90-
}

0 commit comments

Comments
 (0)