RMQ - RabbitMQ C++ Library
rmqp_metricpublisher.h
1// Copyright 2020-2023 Bloomberg Finance L.P.
2// SPDX-License-Identifier: Apache-2.0
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#ifndef INCLUDED_RMQP_METRICPUBLISHER
17#define INCLUDED_RMQP_METRICPUBLISHER
18
19#include <bsl_string.h>
20#include <bsl_utility.h>
21#include <bsl_vector.h>
22
23namespace BloombergLP {
24namespace rmqp {
25
38 public:
39 virtual ~MetricPublisher();
40
42 virtual void publishGauge(
43 const bsl::string& name,
44 double value,
45 const bsl::vector<bsl::pair<bsl::string, bsl::string> >& tags) = 0;
46
48 virtual void publishCounter(
49 const bsl::string& name,
50 double value,
51 const bsl::vector<bsl::pair<bsl::string, bsl::string> >& tags) = 0;
52
54 virtual void publishSummary(
55 const bsl::string& name,
56 double value,
57 const bsl::vector<bsl::pair<bsl::string, bsl::string> >& tags) = 0;
58
61 virtual void publishDistribution(
62 const bsl::string& name,
63 double value,
64 const bsl::vector<bsl::pair<bsl::string, bsl::string> >& tags) = 0;
65};
66
67} // namespace rmqp
68} // namespace BloombergLP
69
70#endif
An interface for publishing rmqcpp metrics.
Definition: rmqp_metricpublisher.h:37
virtual void publishSummary(const bsl::string &name, double value, const bsl::vector< bsl::pair< bsl::string, bsl::string > > &tags)=0
Publish a value for basic summary statistics.
virtual void publishDistribution(const bsl::string &name, double value, const bsl::vector< bsl::pair< bsl::string, bsl::string > > &tags)=0
virtual void publishCounter(const bsl::string &name, double value, const bsl::vector< bsl::pair< bsl::string, bsl::string > > &tags)=0
Publish an increment to a counter variable.
virtual void publishGauge(const bsl::string &name, double value, const bsl::vector< bsl::pair< bsl::string, bsl::string > > &tags)=0
Publish a gauge - the most recently observed value of a variable.