Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixing spaces based on review
Browse files Browse the repository at this point in the history
snehavats1404 committed Jan 13, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent bb7363d commit a0507d6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/brpc/builtin/prometheus_metrics_service.cpp
Original file line number Diff line number Diff line change
@@ -103,10 +103,10 @@ bool PrometheusMetricsDumper::dump(const std::string& name,

auto metrics_name = GetMetricsName(name);

if(emitted_metrics.find(metrics_name.as_string()) == emitted_metrics.end()){
*_os<< "# HELP " << metrics_name <<'\n'
<< "# TYPE " << metrics_name <<" gauge\n";
emitted_metrics.insert(metrics_name.as_string());
if (emitted_metrics.find(metrics_name.as_string()) == emitted_metrics.end()) {
*_os << "# HELP " << metrics_name << '\n'
<< "# TYPE " << metrics_name << " gauge\n";
emitted_metrics.insert(metrics_name.as_string());
}

*_os << name << " " << desc << '\n';
@@ -169,7 +169,7 @@ bool PrometheusMetricsDumper::DumpLatencyRecorderSuffix(
if (!si->IsComplete()) {
return true;
}
if(emitted_metrics.find(si->metric_name) == emitted_metrics.end()){
if (emitted_metrics.find(si->metric_name) == emitted_metrics.end()) {
*_os << "# HELP " << si->metric_name << '\n'
<< "# TYPE " << si->metric_name << " summary\n";
emitted_metrics.insert(si->metric_name);

0 comments on commit a0507d6

Please sign in to comment.