27 #ifndef ThriftBroker_MetricsHandler_h
28 #define ThriftBroker_MetricsHandler_h
37 #include <Common/metrics>
53 class MetricsHandler :
public DispatchHandler {
66 MetricsHandler(
PropertiesPtr &props, Cronolog *slow_query_log);
73 void start_collecting();
76 void stop_collecting();
85 virtual void handle(
EventPtr &event);
102 m_active_connections++;
108 m_active_connections--;
120 MetricsProcess m_metrics_process;
126 int64_t m_last_timestamp;
129 int32_t m_collection_interval {};
132 interval_metric<int64_t> m_requests {};
135 interval_metric<int64_t> m_errors {};
138 atomic<int32_t> m_active_connections {0};
147 #endif // ThriftBroker_MetricsHandler_h
std::shared_ptr< MetricsHandler > MetricsHandlerPtr
Smart pointer to MetricsHandler.
Declarations for MetricsCollectorGanglia.
Program options handling.
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
void request_increment()
Increments request count.
Declarations for Cronolog.
void connection_increment()
Increments connection count.
void connection_decrement()
Decrements connection count.
Declarations for DispatchHandler.
Declarations for MetricsProcess.
std::shared_ptr< Properties > PropertiesPtr
std::shared_ptr< MetricsCollectorGanglia > MetricsCollectorGangliaPtr
Smart pointer to MetricsCollectorGanglia.
Entry point to AsyncComm service.
virtual ~MetricsHandler()
Destructor.
void error_increment()
Increments error count.