expose dropped message counts and fix some typos/wording

This commit is contained in:
James Wilson
2021-08-13 11:33:53 +01:00
parent 811babca27
commit b842c7fc8b
4 changed files with 23 additions and 7 deletions
+6 -2
View File
@@ -486,8 +486,8 @@ async fn return_prometheus_metrics(aggregator: AggregatorSet) -> Response<hyper:
let metrics = aggregator.latest_metrics();
// Instead of using the rust prometheus library (which is optimised around global variables updated across a codebase),
// we just split out the text format that prometheus expects ourselves, using whatever the latest metrics that we've
// captured so far from the aggregators are. See:
// we just split out the text format that prometheus expects ourselves, and use the latest metrics that we've
// captured so far from the aggregators. See:
//
// https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-format-details
//
@@ -529,6 +529,10 @@ async fn return_prometheus_metrics(aggregator: AggregatorSet) -> Response<hyper:
"telemetry_total_messages_to_aggregator{{aggregator=\"{}\"}} {} {}\n\n",
idx, m.total_messages_to_aggregator, m.timestamp_unix_ms
));
s.push_str(&format!(
"telemetry_dropped_messages_to_aggregator{{aggregator=\"{}\"}} {} {}\n\n",
idx, m.dropped_messages_to_aggregator, m.timestamp_unix_ms
));
}
Response::builder()