#include <zipkin.hpp>
Definition at line 26 of file zipkin.hpp.
◆ get_next_unique_id()
uint64_t fc::zipkin_config::get_next_unique_id |
( |
| ) |
|
|
static |
Definition at line 39 of file zipkin.cpp.
39 {
40 if( !get().zip ) {
42 }
43 return get().zip->get_next_unique_id();
44}
#define FC_THROW_EXCEPTION(EXCEPTION, FORMAT,...)
◆ get_zipkin()
zipkin & fc::zipkin_config::get_zipkin |
( |
| ) |
|
|
static |
Thread safe only if init() called from main thread before spawning of any threads
- Exceptions
-
assert_exception | if called before init() |
Definition at line 26 of file zipkin.cpp.
26 {
27 if( !get().zip ) {
29 }
30 return *get().zip;
31}
◆ init()
void fc::zipkin_config::init |
( |
const std::string & | url, |
|
|
const std::string & | service_name, |
|
|
uint32_t | timeout_us ) |
|
static |
Not thread safe, call from main thread before spawning any threads that might use zipkin.
- Parameters
-
url | the url endpoint of zipkin server. e.g. http://127.0.0.1:9411/api/v2/spans |
service_name | the service name to include in each zipkin span |
timeout_us | the timeout in microseconds for each http call (9 consecutive failures and zipkin is disabled) |
Definition at line 22 of file zipkin.cpp.
22 {
23 get().zip = std::make_unique<zipkin>(
url, service_name, timeout_us );
24}
◆ is_enabled()
static bool fc::zipkin_config::is_enabled |
( |
| ) |
|
|
inlinestatic |
Definition at line 29 of file zipkin.hpp.
29{ return get_zipkin_() != nullptr; }
◆ shutdown()
void fc::zipkin_config::shutdown |
( |
| ) |
|
|
static |
Thread safe only if init() called from main thread before spawning of any threads
- Exceptions
-
assert_exception | if called before init() |
Definition at line 33 of file zipkin.cpp.
33 {
34 if( zipkin* z = get_zipkin_() ) {
35 z->shutdown();
36 }
37}
The documentation for this class was generated from the following files: