rippled
|
Public Types | |
using | ptr = std::shared_ptr< Collector > |
Public Member Functions | |
StatsDCollectorImp (IP::Endpoint const &address, std::string const &prefix, Journal journal) | |
~StatsDCollectorImp () override | |
Hook | make_hook (HookImpl::HandlerType const &handler) override |
Counter | make_counter (std::string const &name) override |
Create a counter with the specified name. More... | |
Event | make_event (std::string const &name) override |
Create an event with the specified name. More... | |
Gauge | make_gauge (std::string const &name) override |
Create a gauge with the specified name. More... | |
Meter | make_meter (std::string const &name) override |
Create a meter with the specified name. More... | |
void | add (StatsDMetricBase &metric) |
void | remove (StatsDMetricBase &metric) |
boost::asio::io_service & | get_io_service () |
std::string const & | prefix () const |
void | do_post_buffer (std::string const &buffer) |
void | post_buffer (std::string &&buffer) |
void | on_send (std::shared_ptr< std::deque< std::string >>, boost::system::error_code ec, std::size_t) |
void | log (std::vector< boost::asio::const_buffer > const &buffers) |
void | send_buffers () |
void | set_timer () |
void | on_timer (boost::system::error_code ec) |
void | run () |
T | shared_from_this (T... args) |
T | weak_from_this (T... args) |
template<class Handler > | |
Hook | make_hook (Handler handler) |
Create a hook. More... | |
Counter | make_counter (std::string const &prefix, std::string const &name) |
Event | make_event (std::string const &prefix, std::string const &name) |
Gauge | make_gauge (std::string const &prefix, std::string const &name) |
Meter | make_meter (std::string const &prefix, std::string const &name) |
template<class Handler > | |
Hook | make_hook (Handler handler) |
Create a hook. More... | |
Counter | make_counter (std::string const &prefix, std::string const &name) |
Event | make_event (std::string const &prefix, std::string const &name) |
Gauge | make_gauge (std::string const &prefix, std::string const &name) |
Meter | make_meter (std::string const &prefix, std::string const &name) |
template<class Handler > | |
Hook | make_hook (Handler handler) |
Create a hook. More... | |
Counter | make_counter (std::string const &prefix, std::string const &name) |
Event | make_event (std::string const &prefix, std::string const &name) |
Gauge | make_gauge (std::string const &prefix, std::string const &name) |
Meter | make_meter (std::string const &prefix, std::string const &name) |
Static Public Member Functions | |
static std::shared_ptr< StatsDCollector > | New (IP::Endpoint const &address, std::string const &prefix, Journal journal) |
Create a StatsD collector. More... | |
Private Types | |
enum | { max_packet_size = 1472 } |
Static Private Member Functions | |
static boost::asio::ip::udp::endpoint | to_endpoint (IP::Endpoint const &ep) |
Private Attributes | |
Journal | m_journal |
IP::Endpoint | m_address |
std::string | m_prefix |
boost::asio::io_service | m_io_service |
std::optional< boost::asio::io_service::work > | m_work |
boost::asio::io_service::strand | m_strand |
boost::asio::basic_waitable_timer< std::chrono::steady_clock > | m_timer |
boost::asio::ip::udp::socket | m_socket |
std::deque< std::string > | m_data |
std::recursive_mutex | metricsLock_ |
List< StatsDMetricBase > | metrics_ |
std::thread | m_thread |
Definition at line 213 of file StatsDCollector.cpp.
|
inherited |
Definition at line 47 of file Collector.h.
|
private |
Enumerator | |
---|---|
max_packet_size |
Definition at line 218 of file StatsDCollector.cpp.
beast::insight::detail::StatsDCollectorImp::StatsDCollectorImp | ( | IP::Endpoint const & | address, |
std::string const & | prefix, | ||
Journal | journal | ||
) |
Definition at line 245 of file StatsDCollector.cpp.
|
override |
Definition at line 260 of file StatsDCollector.cpp.
|
staticprivate |
Definition at line 239 of file StatsDCollector.cpp.
|
overridevirtual |
Implements beast::insight::Collector.
Definition at line 270 of file StatsDCollector.cpp.
|
overridevirtual |
Create a counter with the specified name.
Implements beast::insight::Collector.
Definition at line 277 of file StatsDCollector.cpp.
|
overridevirtual |
Create an event with the specified name.
Implements beast::insight::Collector.
Definition at line 284 of file StatsDCollector.cpp.
|
overridevirtual |
Create a gauge with the specified name.
Implements beast::insight::Collector.
Definition at line 291 of file StatsDCollector.cpp.
|
overridevirtual |
Create a meter with the specified name.
Implements beast::insight::Collector.
Definition at line 298 of file StatsDCollector.cpp.
void beast::insight::detail::StatsDCollectorImp::add | ( | StatsDMetricBase & | metric | ) |
Definition at line 307 of file StatsDCollector.cpp.
void beast::insight::detail::StatsDCollectorImp::remove | ( | StatsDMetricBase & | metric | ) |
Definition at line 314 of file StatsDCollector.cpp.
boost::asio::io_service& beast::insight::detail::StatsDCollectorImp::get_io_service | ( | ) |
Definition at line 323 of file StatsDCollector.cpp.
std::string const& beast::insight::detail::StatsDCollectorImp::prefix | ( | ) | const |
Definition at line 329 of file StatsDCollector.cpp.
void beast::insight::detail::StatsDCollectorImp::do_post_buffer | ( | std::string const & | buffer | ) |
Definition at line 335 of file StatsDCollector.cpp.
void beast::insight::detail::StatsDCollectorImp::post_buffer | ( | std::string && | buffer | ) |
Definition at line 341 of file StatsDCollector.cpp.
void beast::insight::detail::StatsDCollectorImp::on_send | ( | std::shared_ptr< std::deque< std::string >> | , |
boost::system::error_code | ec, | ||
std::size_t | |||
) |
Definition at line 350 of file StatsDCollector.cpp.
void beast::insight::detail::StatsDCollectorImp::log | ( | std::vector< boost::asio::const_buffer > const & | buffers | ) |
Definition at line 367 of file StatsDCollector.cpp.
void beast::insight::detail::StatsDCollectorImp::send_buffers | ( | ) |
Definition at line 384 of file StatsDCollector.cpp.
void beast::insight::detail::StatsDCollectorImp::set_timer | ( | ) |
Definition at line 438 of file StatsDCollector.cpp.
void beast::insight::detail::StatsDCollectorImp::on_timer | ( | boost::system::error_code | ec | ) |
Definition at line 447 of file StatsDCollector.cpp.
void beast::insight::detail::StatsDCollectorImp::run | ( | ) |
Definition at line 470 of file StatsDCollector.cpp.
|
staticinherited |
Create a StatsD collector.
address | The IP address and port of the StatsD server. |
prefix | A string pre-pended before each metric name. |
journal | Destination for logging output. |
Definition at line 736 of file StatsDCollector.cpp.
|
inherited |
Create a hook.
A hook is called at each collection interval, on an implementation defined thread. This is a convenience facility for gathering metrics in the polling style. The typical usage is to update all the metrics of interest in the handler.
Handler will be called with this signature: void handler (void)
Definition at line 66 of file Collector.h.
|
inherited |
Definition at line 83 of file Collector.h.
|
inherited |
Definition at line 99 of file Collector.h.
|
inherited |
Definition at line 115 of file Collector.h.
|
inherited |
Definition at line 131 of file Collector.h.
|
private |
Definition at line 223 of file StatsDCollector.cpp.
|
private |
Definition at line 224 of file StatsDCollector.cpp.
|
private |
Definition at line 225 of file StatsDCollector.cpp.
|
private |
Definition at line 226 of file StatsDCollector.cpp.
|
private |
Definition at line 227 of file StatsDCollector.cpp.
|
private |
Definition at line 228 of file StatsDCollector.cpp.
|
private |
Definition at line 229 of file StatsDCollector.cpp.
|
private |
Definition at line 230 of file StatsDCollector.cpp.
|
private |
Definition at line 231 of file StatsDCollector.cpp.
|
private |
Definition at line 232 of file StatsDCollector.cpp.
|
private |
Definition at line 233 of file StatsDCollector.cpp.
|
private |
Definition at line 236 of file StatsDCollector.cpp.