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
commit1715700d00b30399d3648be821fd585ae552365e (patch)
tree6857a59158ea36e56d87fb32fbb8e44673c0ca0f /library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
parentb23c1d7a8015c2006a148fd93b84cdeb0aee17a3 (diff)
downloadydb-1715700d00b30399d3648be821fd585ae552365e.tar.gz
Restoring authorship annotation for <gusev-p@yandex-team.ru>. Commit 1 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 7e81357dbd..5dc0bc8033 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();
}