Skip to content

Commit

Permalink
always set metric help to something
Browse files Browse the repository at this point in the history
  • Loading branch information
derklaro committed Oct 20, 2023
1 parent c03782c commit ceb3347
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openmetrics_udpserver/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ impl Processor {
return match self.metric_registry.try_write() {
Ok(mut registry) => {
let metric = metric_type_factory();
(*registry).register(metric_name, "", metric.clone());
(*registry).register(
metric_name,
format!("The {} metric", metric_name),
metric.clone(),
);

let rc_metric = Rc::new(metric);
self.metrics.insert(metric_name.clone(), rc_metric.clone());
Expand Down

0 comments on commit ceb3347

Please sign in to comment.