opentracing-c
OpenTracing C API
|
Span context interface. More...
#include <opentracing-c/span.h>
Data Fields | |
opentracing_destructible | base |
Base class member. More... | |
void(* | foreach_baggage_item )(struct opentracing_span_context *span_context, opentracing_bool(*f)(void *arg, const char *key, const char *value), void *arg) |
Calls a function for each baggage item in the span context. More... | |
const void * | type_descriptor |
Unique data used to identify tracing vendor span type. More... | |
unsigned int | type_descriptor_length |
Number of bytes the type descriptor occupies in memory. | |
![]() | |
void(* | destroy )(struct opentracing_destructible *destructible) OPENTRACINGC_NONNULL_ALL |
Destructor to clean up any resources allocated to the instance. More... | |
Span context interface.
Span context represents span state that must be propagated to descendant spans and across boundaries (e.g. trace I:D, span ID, baggage).
opentracing_destructible opentracing_span_context::base |
Base class member.
void(* opentracing_span_context::foreach_baggage_item) (struct opentracing_span_context *span_context, opentracing_bool(*f)(void *arg, const char *key, const char *value), void *arg) |
Calls a function for each baggage item in the span context.
If the function returns opentracing_false, it will not be called again, and foreach_baggage_item will return immediately.
span_context | Span context instance. |
f | Callback function. Takes a user-defined argument, the baggage key, and the baggage value. |
arg | Argument to pass to callback function. |
const void* opentracing_span_context::type_descriptor |
Unique data used to identify tracing vendor span type.
Necessary for tracer to cast span to vendor's type during extract().
Below is a sample of a potential tracer creating a new span with a unique type descriptor.