#include <zipkin.hpp>
|
| zipkin_span (std::string name, uint64_t parent_id=0) |
|
| zipkin_span (uint64_t id, std::string name, uint64_t parent_id=0) |
|
| zipkin_span (const zipkin_span &)=delete |
|
zipkin_span & | operator= (const zipkin_span &)=delete |
|
zipkin_span & | operator= (zipkin_span &&)=delete |
|
| zipkin_span (zipkin_span &&rhs) noexcept |
|
| ~zipkin_span () |
|
void | add_tag (const std::string &key, const std::string &var) |
|
void | add_tag (const std::string &key, const char *var) |
|
void | add_tag (const std::string &key, bool v) |
|
template<typename T > |
std::enable_if_t< std::is_arithmetic_v< std::remove_reference_t< T > >, void > | add_tag (const std::string &key, T &&var) |
|
template<typename T > |
std::enable_if_t<!std::is_arithmetic_v< std::remove_reference_t< T > >, void > | add_tag (const std::string &key, T &&var) |
|
token | get_token () const |
|
Definition at line 60 of file zipkin.hpp.
◆ zipkin_span() [1/4]
fc::zipkin_span::zipkin_span |
( |
std::string | name, |
|
|
uint64_t | parent_id = 0 ) |
|
inlineexplicit |
◆ zipkin_span() [2/4]
fc::zipkin_span::zipkin_span |
( |
uint64_t | id, |
|
|
std::string | name, |
|
|
uint64_t | parent_id = 0 ) |
|
inlineexplicit |
◆ zipkin_span() [3/4]
◆ zipkin_span() [4/4]
Definition at line 71 of file zipkin.hpp.
72 :
data( std::move( rhs.data ) ) {
74 }
◆ ~zipkin_span()
fc::zipkin_span::~zipkin_span |
( |
| ) |
|
Definition at line 197 of file zipkin.cpp.
197 {
198 if( data.id == 0 )
199 return;
200 try {
204 }
205 } catch( ... ) {}
206}
static bool is_enabled()
Thread safe only if init() called from main thread before spawning of any threads.
static zipkin & get_zipkin()
void log(zipkin_span::span_data &&span)
◆ add_tag() [1/5]
void fc::zipkin_span::add_tag |
( |
const std::string & | key, |
|
|
bool | v ) |
|
inline |
Definition at line 88 of file zipkin.hpp.
88 {
89
90 data.tags( key, v ? "true" : "false" );
91 }
◆ add_tag() [2/5]
void fc::zipkin_span::add_tag |
( |
const std::string & | key, |
|
|
const char * | var ) |
|
inline |
Definition at line 83 of file zipkin.hpp.
83 {
84
85 data.tags( key, var );
86 }
◆ add_tag() [3/5]
void fc::zipkin_span::add_tag |
( |
const std::string & | key, |
|
|
const std::string & | var ) |
|
inline |
Definition at line 78 of file zipkin.hpp.
78 {
79
80 data.tags( key, var );
81 }
◆ add_tag() [4/5]
std::enable_if_t< std::is_arithmetic_v< std::remove_reference_t< T > >, void > fc::zipkin_span::add_tag |
( |
const std::string & | key, |
|
|
T && | var ) |
|
inline |
Definition at line 95 of file zipkin.hpp.
95 {
96 data.tags( key, std::to_string( std::forward<T>( var ) ) );
97 }
◆ add_tag() [5/5]
std::enable_if_t<!std::is_arithmetic_v< std::remove_reference_t< T > >, void > fc::zipkin_span::add_tag |
( |
const std::string & | key, |
|
|
T && | var ) |
|
inline |
Definition at line 101 of file zipkin.hpp.
101 {
102 data.tags( key, (std::string) var );
103 }
◆ get_token()
token fc::zipkin_span::get_token |
( |
| ) |
const |
|
inline |
Definition at line 116 of file zipkin.hpp.
116{ return token{data.id}; };
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ to_id() [1/2]
Definition at line 192 of file zipkin.cpp.
192 {
193
194 return id._hash[3] == 0 ? 1 : id._hash[3];
195}
◆ to_id() [2/2]
static uint64_t fc::zipkin_span::to_id |
( |
const T & | id | ) |
|
|
inlinestatic |
Definition at line 121 of file zipkin.hpp.
121 {
122 static_assert( std::is_same_v<
decltype(
id.data() ),
const uint64_t*>,
"expected uint64_t" );
123 return id.data()[3];
124 }
unsigned __int64 uint64_t
◆ data
The documentation for this struct was generated from the following files: