opentelemetry_sdk/metrics/
noop.rs1use opentelemetry::{
2 metrics::{InstrumentProvider, SyncInstrument},
3 KeyValue,
4};
5
6#[derive(Debug, Default)]
8pub(crate) struct NoopMeter {
9 _private: (),
10}
11
12impl NoopMeter {
13 pub(crate) fn new() -> Self {
15 NoopMeter { _private: () }
16 }
17}
18
19impl InstrumentProvider for NoopMeter {}
20
21#[derive(Debug, Default)]
23pub(crate) struct NoopSyncInstrument {
24 _private: (),
25}
26
27impl NoopSyncInstrument {
28 pub(crate) fn new() -> Self {
30 NoopSyncInstrument { _private: () }
31 }
32}
33
34impl<T> SyncInstrument<T> for NoopSyncInstrument {
35 fn measure(&self, _value: T, _attributes: &[KeyValue]) {
36 }
38}