@@ -12,6 +12,7 @@ use super::prometheus::PrometheusSerializable;
1212use crate :: metric:: description:: MetricDescription ;
1313use crate :: sample_collection:: SampleCollection ;
1414use crate :: unit:: Unit ;
15+ use crate :: METRICS_TARGET ;
1516
1617// code-review: serialize in a deterministic order? For example:
1718// - First the counter metrics ordered by name.
@@ -56,7 +57,8 @@ impl MetricCollection {
5657
5758 // Counter-specific methods
5859
59- pub fn describe_counter ( & mut self , name : & MetricName , _opt_unit : Option < Unit > , _opt_description : Option < MetricDescription > ) {
60+ pub fn describe_counter ( & mut self , name : & MetricName , opt_unit : Option < Unit > , opt_description : Option < MetricDescription > ) {
61+ tracing:: info!( target: METRICS_TARGET , type = "counter" , name = name. to_string( ) , unit = ?opt_unit, description = ?opt_description) ;
6062 self . counters . ensure_metric_exists ( name) ;
6163 }
6264
@@ -97,7 +99,8 @@ impl MetricCollection {
9799
98100 // Gauge-specific methods
99101
100- pub fn describe_gauge ( & mut self , name : & MetricName , _opt_unit : Option < Unit > , _opt_description : Option < MetricDescription > ) {
102+ pub fn describe_gauge ( & mut self , name : & MetricName , opt_unit : Option < Unit > , opt_description : Option < MetricDescription > ) {
103+ tracing:: info!( target: METRICS_TARGET , type = "gauge" , name = name. to_string( ) , unit = ?opt_unit, description = ?opt_description) ;
101104 self . gauges . ensure_metric_exists ( name) ;
102105 }
103106
0 commit comments