#include <zipkin.hpp>
Definition at line 175 of file zipkin.hpp.
◆ zipkin()
fc::zipkin::zipkin |
( |
const std::string & | url, |
|
|
const std::string & | service_name, |
|
|
uint32_t | timeout_us ) |
Definition at line 102 of file zipkin.cpp.
102 :
103 my(
new impl(
url, service_name, timeout_us ) ) {
104 my->init();
105}
◆ ~zipkin()
◆ get_next_unique_id()
uint64_t fc::zipkin::get_next_unique_id |
( |
| ) |
|
Definition at line 107 of file zipkin.cpp.
107 {
108 std::scoped_lock g( my->mtx );
109 if( my->next_id == 0 ) {
110 std::mt19937_64 engine( std::random_device{}() );
111 std::uniform_int_distribution<uint64_t> distribution(1);
112 my->next_id = distribution( engine );
113 }
114 return my->next_id++;
115}
◆ log()
Definition at line 158 of file zipkin.cpp.
158 {
159 if( my->consecutive_errors > my->max_consecutive_errors || my->stopped )
160 return;
161
162 boost::asio::post(my->work_strand, [this, span{std::move(span)}]() mutable {
163 my->log( std::move( span ) );
164 });
165}
◆ shutdown()
void fc::zipkin::shutdown |
( |
| ) |
|
Definition at line 117 of file zipkin.cpp.
117 {
118 my->shutdown();
119}
The documentation for this class was generated from the following files: