Definition at line 46 of file zipkin.cpp.
◆ impl()
fc::zipkin::impl::impl |
( |
std::string | url, |
|
|
std::string | service_name, |
|
|
uint32_t | timeout_us ) |
|
inline |
Definition at line 64 of file zipkin.cpp.
68 }
const uint32_t timeout_us
const std::string service_name
const std::string zipkin_url
◆ ~impl()
fc::zipkin::impl::~impl |
( |
| ) |
|
Definition at line 90 of file zipkin.cpp.
90 {
91 try {
93 } catch (...) {}
94}
◆ init()
void fc::zipkin::impl::init |
( |
| ) |
|
Definition at line 78 of file zipkin.cpp.
78 {
79 thread = std::thread( [this]() {
81 while( true ) {
82 try {
84 break;
86 }
87 } );
88}
boost::asio::io_context ctx
#define FC_LOG_AND_DROP(...)
void set_os_thread_name(const string &name)
◆ log()
Definition at line 167 of file zipkin.cpp.
167 {
169 return;
170
171 try {
176 }
177
179
181 return;
184 } catch( const std::exception& e ) {
185 wlog(
"unable to connect to zipkin: ${u}, error: ${e}", (
"u",
zipkin_url)(
"e", e.what()) );
186 } catch( ... ) {
187 wlog(
"unable to connect to zipkin: ${u}, error: unknown", (
"u",
zipkin_url) );
188 }
190}
Used to generate a useful error report when an exception is thrown.
std::string to_detail_string(log_level ll=log_level::all) const
std::optional< url > endpoint
static constexpr uint32_t max_consecutive_errors
std::atomic< uint32_t > consecutive_errors
fc::variant create_zipkin_variant(zipkin_span::span_data &&span, const std::string &service_name)
◆ shutdown()
void fc::zipkin::impl::shutdown |
( |
| ) |
|
Definition at line 96 of file zipkin.cpp.
96 {
99 thread.join();
100}
std::atomic< unsigned char > stopped
boost::asio::executor_work_guard< boost::asio::io_context::executor_type > work_guard
◆ consecutive_errors
std::atomic<uint32_t> fc::zipkin::impl::consecutive_errors = 0 |
◆ ctx
boost::asio::io_context fc::zipkin::impl::ctx |
◆ endpoint
std::optional<url> fc::zipkin::impl::endpoint |
◆ http
◆ max_consecutive_errors
uint32_t fc::zipkin::impl::max_consecutive_errors = 9 |
|
staticconstexpr |
◆ mtx
std::mutex fc::zipkin::impl::mtx |
◆ next_id
◆ service_name
const std::string fc::zipkin::impl::service_name |
◆ stopped
std::atomic<unsigned char> fc::zipkin::impl::stopped = 0 |
◆ thread
std::thread fc::zipkin::impl::thread |
◆ timeout_us
const uint32_t fc::zipkin::impl::timeout_us |
◆ work_guard
boost::asio::executor_work_guard<boost::asio::io_context::executor_type> fc::zipkin::impl::work_guard = boost::asio::make_work_guard(ctx) |
◆ work_strand
boost::asio::io_context::strand fc::zipkin::impl::work_strand {ctx} |
◆ zipkin_url
const std::string fc::zipkin::impl::zipkin_url |
The documentation for this class was generated from the following file: