File tree Expand file tree Collapse file tree 3 files changed +1
-32
lines changed
opentelemetry/src/metrics/instruments Expand file tree Collapse file tree 3 files changed +1
-32
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,6 @@ impl<T> fmt::Debug for ObservableCounter<T> {
5353 }
5454}
5555
56- impl < T > ObservableCounter < T > {
57- /// Records an increment to the counter.
58- ///
59- /// It is only valid to call this within a callback. If called outside of the
60- /// registered callback it should have no effect on the instrument, and an
61- /// error will be reported via the error handler.
62- pub fn observe ( & self , value : T , attributes : & [ KeyValue ] ) {
63- self . 0 . observe ( value, attributes)
64- }
65- }
66-
6756impl < T > AsyncInstrument < T > for ObservableCounter < T > {
6857 fn observe ( & self , measurement : T , attributes : & [ KeyValue ] ) {
6958 self . 0 . observe ( measurement, attributes)
Original file line number Diff line number Diff line change 4949 }
5050}
5151
52- impl < T > ObservableGauge < T > {
53- /// Records the state of the instrument.
54- ///
55- /// It is only valid to call this within a callback. If called outside of the
56- /// registered callback it should have no effect on the instrument, and an
57- /// error will be reported via the error handler.
58- pub fn observe ( & self , measurement : T , attributes : & [ KeyValue ] ) {
59- self . 0 . observe ( measurement, attributes)
60- }
61- }
62-
6352impl < M > AsyncInstrument < M > for ObservableGauge < M > {
6453 fn observe ( & self , measurement : M , attributes : & [ KeyValue ] ) {
65- self . observe ( measurement, attributes)
54+ self . 0 . observe ( measurement, attributes)
6655 }
6756}
6857
Original file line number Diff line number Diff line change @@ -59,15 +59,6 @@ impl<T> ObservableUpDownCounter<T> {
5959 pub fn new ( inner : Arc < dyn AsyncInstrument < T > > ) -> Self {
6060 ObservableUpDownCounter ( inner)
6161 }
62-
63- /// Records the increment or decrement to the counter.
64- ///
65- /// It is only valid to call this within a callback. If called outside of the
66- /// registered callback it should have no effect on the instrument, and an
67- /// error will be reported via the error handler.
68- pub fn observe ( & self , value : T , attributes : & [ KeyValue ] ) {
69- self . 0 . observe ( value, attributes)
70- }
7162}
7263
7364impl < T > AsyncInstrument < T > for ObservableUpDownCounter < T > {
You can’t perform that action at this time.
0 commit comments