cloud/metrics/prometheus/family_factory.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018 The Cartographer Authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CARTOGRAPHER_CLOUD_METRICS_PROMETHEUS_FAMILY_FACTORY_H_
18 #define CARTOGRAPHER_CLOUD_METRICS_PROMETHEUS_FAMILY_FACTORY_H_
19 
20 #include <memory>
21 #include <string>
22 
24 #include "prometheus/registry.h"
25 
26 namespace cartographer {
27 namespace cloud {
28 namespace metrics {
29 namespace prometheus {
30 
32  public:
33  FamilyFactory();
34 
36  NewCounterFamily(const std::string& name,
37  const std::string& description) override;
39  NewGaugeFamily(const std::string& name,
40  const std::string& description) override;
42  NewHistogramFamily(const std::string& name, const std::string& description,
43  const ::cartographer::metrics::Histogram::BucketBoundaries&
44  boundaries) override;
45 
46  std::weak_ptr<::prometheus::Collectable> GetCollectable() const;
47 
48  private:
49  std::vector<std::unique_ptr<
52  std::vector<std::unique_ptr<
55  std::vector<std::unique_ptr<
58  std::shared_ptr<::prometheus::Registry> registry_;
59 };
60 
61 } // namespace prometheus
62 } // namespace metrics
63 } // namespace cloud
64 } // namespace cartographer
65 
66 #endif // CARTOGRAPHER_CLOUD_METRICS_PROMETHEUS_FAMILY_FACTORY_H_
std::weak_ptr<::prometheus::Collectable > GetCollectable() const
::cartographer::metrics::Family<::cartographer::metrics::Gauge > * NewGaugeFamily(const std::string &name, const std::string &description) override
std::vector< std::unique_ptr< ::cartographer::metrics::Family<::cartographer::metrics::Counter > > > counters_
::cartographer::metrics::Family<::cartographer::metrics::Histogram > * NewHistogramFamily(const std::string &name, const std::string &description, const ::cartographer::metrics::Histogram::BucketBoundaries &boundaries) override
std::vector< std::unique_ptr< ::cartographer::metrics::Family<::cartographer::metrics::Histogram > > > histograms_
::cartographer::metrics::Family<::cartographer::metrics::Counter > * NewCounterFamily(const std::string &name, const std::string &description) override
std::vector< std::unique_ptr< ::cartographer::metrics::Family<::cartographer::metrics::Gauge > > > gauges_


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:58