#include <fc/log/zipkin.hpp>
#include <optional>
Go to the source code of this file.
◆ fc_add_tag
#define fc_add_tag |
( |
| SPAN_VARNAME, |
|
|
| TAG_KEY_STR, |
|
|
| TAG_VALUE_STR ) |
Value: FC_MULTILINE_MACRO_BEGIN \
(SPAN_VARNAME)->add_tag( (TAG_KEY_STR), (TAG_VALUE_STR) ); \
static bool is_enabled()
Thread safe only if init() called from main thread before spawning of any threads.
#define FC_MULTILINE_MACRO_END
- Parameters
-
SPAN_VARNAME | variable returned from fc_create_span |
TAG_KEY_STR | string key |
TAG_VALUE | string value |
Definition at line 40 of file trace.hpp.
40#define fc_add_tag( SPAN_VARNAME, TAG_KEY_STR, TAG_VALUE_STR) \
41 FC_MULTILINE_MACRO_BEGIN \
42 if( (SPAN_VARNAME) && ::fc::zipkin_config::is_enabled() ) \
43 (SPAN_VARNAME)->add_tag( (TAG_KEY_STR), (TAG_VALUE_STR) ); \
44 FC_MULTILINE_MACRO_END
◆ fc_create_span
#define fc_create_span |
( |
| TRACE_VARNAME, |
|
|
| SPAN_STR ) |
Value:
(TRACE_VARNAME).opt->create_span( (SPAN_STR) ) \
: ::std::optional<::fc::zipkin_span>{};
- Parameters
-
TRACE_VARNAME | variable returned from fc_create_trace |
SPAN_STR | const char* indentifier |
- Returns
- implementation defined type RAII object that submits span on exit of scope
Definition at line 24 of file trace.hpp.
24#define fc_create_span( TRACE_VARNAME, SPAN_STR ) \
25 ( (TRACE_VARNAME) && ::fc::zipkin_config::is_enabled() ) ? \
26 (TRACE_VARNAME).opt->create_span( (SPAN_STR) ) \
27 : ::std::optional<::fc::zipkin_span>{};
◆ fc_create_span_from_token
#define fc_create_span_from_token |
( |
| TRACE_TOKEN, |
|
|
| SPAN_STR ) |
Value:
: ::std::optional<::fc::zipkin_span>{};
static std::optional< zipkin_span > create_span_from_token(zipkin_span::token token, std::string name)
- Parameters
-
TRACE_TOKEN | variable returned from trace.get_token() |
SPAN_STR | const char* indentifier |
- Returns
- implementation defined type RAII object that submits span on exit of scope
Definition at line 32 of file trace.hpp.
32#define fc_create_span_from_token( TRACE_TOKEN, SPAN_STR ) \
33 ( (TRACE_TOKEN) && ::fc::zipkin_config::is_enabled() ) ? \
34 ::fc::zipkin_trace::create_span_from_token( (TRACE_TOKEN), (SPAN_STR) ) \
35 : ::std::optional<::fc::zipkin_span>{};
◆ fc_create_trace
#define fc_create_trace |
( |
| TRACE_STR | ) |
|
Value:- Parameters
-
TRACE_STR | const char* identifier for trace |
- Returns
- implementation defined type RAII object that submits trace on exit of scope
Definition at line 8 of file trace.hpp.
8#define fc_create_trace( TRACE_STR ) \
9 ::fc::zipkin_config::is_enabled() ? \
10 ::fc::optional_trace{ ::std::optional<::fc::zipkin_trace>( ::std::in_place, (TRACE_STR) ) } \
11 : ::fc::optional_trace{};
◆ fc_create_trace_with_id
#define fc_create_trace_with_id |
( |
| TRACE_STR, |
|
|
| TRACE_ID ) |
Value:
static uint64_t to_id(const fc::sha256 &id)
- Parameters
-
TRACE_STR | const char* identifier for trace |
TRACE_ID | fc::sha256 id to use |
- Returns
- implementation defined type RAII object that submits trace on exit of scope
Definition at line 16 of file trace.hpp.
16#define fc_create_trace_with_id( TRACE_STR, TRACE_ID ) \
17 ::fc::zipkin_config::is_enabled() ? \
18 ::fc::optional_trace{ ::std::optional<::fc::zipkin_trace>( ::std::in_place, ::fc::zipkin_span::to_id(TRACE_ID), (TRACE_STR) ) } \
19 : ::fc::optional_trace{};