aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
diff options
context:
space:
mode:
authorgusev-p <gusev-p@yandex-team.ru>2022-02-10 16:47:20 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:20 +0300
commit47af3b5bf148ddab250833ec454d30d7c4930c31 (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
parent1715700d00b30399d3648be821fd585ae552365e (diff)
downloadydb-47af3b5bf148ddab250833ec454d30d7c4930c31.tar.gz
Restoring authorship annotation for <gusev-p@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp')
-rw-r--r--library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
index 5dc0bc8033..7e81357dbd 100644
--- a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
+++ b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
@@ -168,10 +168,10 @@ namespace NMonitoring {
///////////////////////////////////////////////////////////////////////
class TPrometheusReader {
public:
- TPrometheusReader(TStringBuf data, IMetricConsumer* c, TStringBuf metricNameLabel)
+ TPrometheusReader(TStringBuf data, IMetricConsumer* c, TStringBuf metricNameLabel)
: Data_(data)
, Consumer_(c)
- , MetricNameLabel_(metricNameLabel)
+ , MetricNameLabel_(metricNameLabel)
{
}
@@ -516,12 +516,12 @@ namespace NMonitoring {
}
void ConsumeLabels(TStringBuf name, const TLabelsMap& labels) {
- Y_PARSER_ENSURE(labels.count(MetricNameLabel_) == 0,
- "label name '" << MetricNameLabel_ <<
+ Y_PARSER_ENSURE(labels.count(MetricNameLabel_) == 0,
+ "label name '" << MetricNameLabel_ <<
"' is reserved, but is used with metric: " << name << LabelsToStr(labels));
Consumer_->OnLabelsBegin();
- Consumer_->OnLabel(MetricNameLabel_, TString(name)); // TODO: remove this string allocation
+ Consumer_->OnLabel(MetricNameLabel_, TString(name)); // TODO: remove this string allocation
for (const auto& it: labels) {
Consumer_->OnLabel(it.first, it.second);
}
@@ -579,7 +579,7 @@ namespace NMonitoring {
private:
TStringBuf Data_;
IMetricConsumer* Consumer_;
- TStringBuf MetricNameLabel_;
+ TStringBuf MetricNameLabel_;
THashMap<TString, EPrometheusMetricType> SeenTypes_;
THistogramBuilder HistogramBuilder_;
@@ -589,8 +589,8 @@ namespace NMonitoring {
};
} // namespace
-void DecodePrometheus(TStringBuf data, IMetricConsumer* c, TStringBuf metricNameLabel) {
- TPrometheusReader reader(data, c, metricNameLabel);
+void DecodePrometheus(TStringBuf data, IMetricConsumer* c, TStringBuf metricNameLabel) {
+ TPrometheusReader reader(data, c, metricNameLabel);
reader.Read();
}